[PXEXT] Avoid returning a false EOF when we have an empty buffer queued
authorMichael Brown <mcb30@etherboot.org>
Tue, 25 Mar 2008 20:29:42 +0000 (20:29 +0000)
committerMichael Brown <mcb30@etherboot.org>
Tue, 25 Mar 2008 20:29:42 +0000 (20:29 +0000)
src/core/posix_io.c

index 2e3781a..b48c1f8 100644 (file)
@@ -293,7 +293,9 @@ ssize_t read_user ( int fd, userptr_t buffer, off_t offset, size_t max_len ) {
                        free_iob ( iobuf );
                }
                file->pos += len;
-               return len;
+               if ( len )
+                       return len;
+               break;
        }
 
        /* If file has completed, return (after returning all data) */