forked from Imagelibrary/rtems
2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
* libcsupport/src/read.c, libcsupport/src/write.c: read(2) and write(2) should return 0 when passed a count of 0 after verifying other possible errors.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
|
||||
|
||||
* libcsupport/src/read.c, libcsupport/src/write.c: read(2) and write(2)
|
||||
should return 0 when passed a count of 0 after verifying other
|
||||
possible errors.
|
||||
|
||||
2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
|
||||
|
||||
* libfs/src/imfs/imfs_creat.c: Fix warning.
|
||||
|
||||
@@ -34,10 +34,12 @@ ssize_t read(
|
||||
rtems_libio_check_count( count );
|
||||
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
|
||||
|
||||
if ( count == 0 )
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Now process the read().
|
||||
*/
|
||||
|
||||
if ( !iop->handlers->read_h )
|
||||
rtems_set_errno_and_return_minus_one( ENOTSUP );
|
||||
|
||||
|
||||
@@ -41,10 +41,12 @@ ssize_t write(
|
||||
rtems_libio_check_count( count );
|
||||
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
|
||||
|
||||
if ( count == 0 )
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Now process the write() request.
|
||||
*/
|
||||
|
||||
if ( !iop->handlers->write_h )
|
||||
rtems_set_errno_and_return_minus_one( ENOTSUP );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user