Re: [Libsysio-commit] HEAD: libsysio/drivers/native fs_native.c
Brought to you by:
lward
From: Lee W. <le...@sa...> - 2004-08-13 15:27:36
|
Let the lower levels fail. Seriously, as I said, there is *nothing* in SYSIO that requires such a check. --Lee On Fri, 2004-08-13 at 11:02, Sonja Tideman wrote: > Update of /cvsroot/libsysio/libsysio/drivers/native > In directory > sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11990/drivers/native > > Modified Files: > fs_native.c > Log Message: > Try 2: take out the MAX_IOVEC references, revert fs_native.c back to > its > original form (which still has the MAX_IOVEC references, but it > defines > it and undefines it within one routine...although this still means > that > someone can define MAX_IOVEC and force the call to > _sysio_enumerate_iovec > instead of the syscall, but that doesn't place any strict limit on the > number of iovecs) > > > Index: fs_native.c > =================================================================== > RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v > retrieving revision 1.45 > retrieving revision 1.46 > diff -u -w -b -B -p -r1.45 -r1.46 > --- fs_native.c 13 Aug 2004 14:40:09 -0000 1.45 > +++ fs_native.c 13 Aug 2004 15:02:50 -0000 1.46 > @@ -1398,6 +1398,10 @@ doiov(const struct iovec *iov, > { > ssize_t cc; > > +#if !(defined(REDSTORM) || defined(MAX_IOVEC)) > +#define MAX_IOVEC INT_MAX > +#endif > + > > if (count <= 0) > return -EINVAL; > @@ -1422,11 +1426,7 @@ doiov(const struct iovec *iov, > */ > cc = > #ifndef REDSTORM > -#ifdef MAX_IOVEC > count <= MAX_IOVEC > -#else > - count <= INT_MAX > -#endif > ? syscall(nio->nio_op == 'r' ? SYS_readv : SYS_writev, > nio->nio_nino->ni_fd, > iov, > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Libsysio-commit mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libsysio-commit > |