[Libsysio-commit] HEAD: libsysio/drivers/native fs_native.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2003-10-20 17:08:21
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory sc8-pr-cvs1:/tmp/cvs-serv15731/native Modified Files: fs_native.c Log Message: From patch supplied by Sue Kelly. The RedStorm integration contained numerous bugs. Fixed are: a) Include uio.h now that we reference members directly. b) Update position before looping over the IO vector. c) Update ioctx_cc member of IO context after each successful partial transfer. Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -w -b -B -p -r1.22 -r1.23 --- fs_native.c 20 Oct 2003 16:44:36 -0000 1.22 +++ fs_native.c 20 Oct 2003 17:01:31 -0000 1.23 @@ -74,6 +74,7 @@ #include "fs_native.h" #ifdef REDSTORM +#include <sys/uio.h> #include <catamount/syscall.h> /* ! in sys include? */ #endif @@ -1216,11 +1217,12 @@ doio(iof f, struct iovec *iov = ioctx->ioctx_iovec; ssize_t cc; + nino->ni_fpos = ioctx->ioctx_offset; while (count) { cc = (*f)(nino->ni_fd, - iov->base, - iov->len, + iov->iov_base, + iov->iov_len, nino->ni_fpos); if (cc < 0) { if (ioctx->ioctx_cc) { @@ -1232,6 +1234,7 @@ doio(iof f, } break; } + ioctx->ioctx_cc += cc; count--, iov++; } } |