diff options
-rw-r--r-- | cpukit/libfs/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/libfs/src/dosfs/fat.c | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/cpukit/libfs/ChangeLog b/cpukit/libfs/ChangeLog index 07923ec407..ecb1bf50c1 100644 --- a/cpukit/libfs/ChangeLog +++ b/cpukit/libfs/ChangeLog @@ -1,3 +1,10 @@ +2003-10-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de> + + PR 509/filesystem + * src/dosfs/fat.c: _fat_block_read and _fat_block_write return error + codes instead of -1 in case of errors, as they are supposed to do + according to the comments documenting these functions. + 2003-10-22 Joel Sherrill <joel@OARcorp.com> PR 440/filesystem diff --git a/cpukit/libfs/src/dosfs/fat.c b/cpukit/libfs/src/dosfs/fat.c index b34a9cb947..586f1dca73 100644 --- a/cpukit/libfs/src/dosfs/fat.c +++ b/cpukit/libfs/src/dosfs/fat.c @@ -64,8 +64,8 @@ _fat_block_read( { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) - return rc; - + return -1; + c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); @@ -119,7 +119,7 @@ _fat_block_write( else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) - return rc; + return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); |