Re: [Libsysio-commit] HEAD: libsysio/drivers/native fs_native.c
Brought to you by:
lward
From: Lee W. <le...@sa...> - 2004-08-13 14:46:31
|
This doesn't look right. How about just let it fail on the malloc... Should return ENOMEM, right? That's good enuff. As far as I know, there is no limit in libsysio for the count of the iovec or xtvec. --Lee On Fri, 2004-08-13 at 10:40, Sonja Tideman wrote: > Update of /cvsroot/libsysio/libsysio/drivers/native > In directory > sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7514/drivers/native > > Modified Files: > fs_native.c > Log Message: > Removed definition of MAX_IOVEC from fs_native.c > > Fixed ireadx to verify the iov_counts and xtv_counts are valid > > > Index: fs_native.c > =================================================================== > RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v > retrieving revision 1.44 > retrieving revision 1.45 > diff -u -w -b -B -p -r1.44 -r1.45 > --- fs_native.c 5 Aug 2004 18:29:57 -0000 1.44 > +++ fs_native.c 13 Aug 2004 14:40:09 -0000 1.45 > @@ -1398,9 +1398,6 @@ 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; > @@ -1425,7 +1422,11 @@ 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 > |