diff options
author | Michael Brown <mcb30@etherboot.org> | 2007-05-26 15:04:36 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2007-05-26 15:04:36 +0000 |
commit | 10d0a1f8c759309ad0aa8f73c87ae7b45cbb5fe6 (patch) | |
tree | 626d6b2493ebf72ef02ae7bae5f7bc77de8d7092 /src/core/posix_io.c | |
parent | 360110338147844bfa4612ae2d6351f1d1054626 (diff) | |
download | ipxe-10d0a1f8c759309ad0aa8f73c87ae7b45cbb5fe6.zip ipxe-10d0a1f8c759309ad0aa8f73c87ae7b45cbb5fe6.tar.gz ipxe-10d0a1f8c759309ad0aa8f73c87ae7b45cbb5fe6.tar.bz2 |
Modify data-xfer semantics: it is no longer necessary to call one of
request(), seek() or deliver_xxx() in order to start the data flow.
Autonomous generators must be genuinely autonomous (having their own
process), or otherwise arrange to be called. TCP does this by
starting the retry timer immediately.
Add some debugging statements.
Diffstat (limited to 'src/core/posix_io.c')
-rw-r--r-- | src/core/posix_io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/posix_io.c b/src/core/posix_io.c index 6cefbf7..3b5660e 100644 --- a/src/core/posix_io.c +++ b/src/core/posix_io.c @@ -191,6 +191,7 @@ static int posix_find_free_fd ( void ) { if ( ! posix_fd_to_file ( fd ) ) return fd; } + DBG ( "POSIX could not find free file descriptor\n" ); return -ENFILE; } @@ -226,13 +227,11 @@ int open ( const char *uri_string ) { if ( ( rc = xfer_open_uri ( &file->xfer, uri_string ) ) != 0 ) goto err; - /* Request data */ - if ( ( rc = xfer_request_all ( &file->xfer ) ) != 0 ) - goto err; - /* Wait for open to succeed or fail */ while ( list_empty ( &file->data ) ) { step(); + if ( file->rc == 0 ) + break; if ( file->rc != -EINPROGRESS ) { rc = file->rc; goto err; @@ -241,6 +240,7 @@ int open ( const char *uri_string ) { /* Add to list of open files. List takes reference ownership. */ list_add ( &file->list, &posix_files ); + DBG ( "POSIX opened %s as file %d\n", uri_string, fd ); return fd; err: |