diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-10-22 16:35:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-10-22 16:35:18 +0000 |
commit | 08c09e2439e2ccf6293015894c8a291ddcf0b6e5 (patch) | |
tree | 8de11e7ff9ba173b3453845a43a88c9395e09d07 /cpukit/libfs/src/dosfs | |
parent | 2003-10-22 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-08c09e2439e2ccf6293015894c8a291ddcf0b6e5.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/dosfs/fat.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |