diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/libcsupport/src/read.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/write.c | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index c368d7101b..db4f81cb0e 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,11 @@ 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. 2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com> diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c index 4e44eec4ff..34d07085b6 100644 --- a/cpukit/libcsupport/src/read.c +++ b/cpukit/libcsupport/src/read.c @@ -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 ); diff --git a/cpukit/libcsupport/src/write.c b/cpukit/libcsupport/src/write.c index 3bda204015..0193466bd5 100644 --- a/cpukit/libcsupport/src/write.c +++ b/cpukit/libcsupport/src/write.c @@ -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 ); |