
In jread(), if we do a partial reading, we need to advance the file pointer.
It's an awful bug, strangely jwrite() and jwritev() are OK, so I must have
missed it.


---

 cur-root/unix.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN unix.c~lseek_on_incomplete_io unix.c
--- cur/unix.c~lseek_on_incomplete_io	2004-08-30 01:30:42.300140832 -0300
+++ cur-root/unix.c	2004-08-30 01:30:42.303140376 -0300
@@ -31,7 +31,7 @@ ssize_t jread(struct jfs *fs, void *buf,
 	rv = spread(fs->fd, buf, count, pos);
 	plockf(fs->fd, F_UNLOCK, pos, count);
 
-	if (rv == count) {
+	if (rv >= 0) {
 		/* if success, advance the file pointer */
 		lseek(fs->fd, count, SEEK_CUR);
 	}
_
