summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-10-22 16:35:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-10-22 16:35:02 +0000
commit5150ab0448a654375b994b0c481b1e4657c0ecfe (patch)
tree9c7b612705b77453bdc63275a2eb2fc6f886ec6a /cpukit/libfs
parent2003-10-22 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-5150ab0448a654375b994b0c481b1e4657c0ecfe.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 'cpukit/libfs')
-rw-r--r--cpukit/libfs/ChangeLog7
-rw-r--r--cpukit/libfs/src/dosfs/fat.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/cpukit/libfs/ChangeLog b/cpukit/libfs/ChangeLog
index eafd6ba3d2..88f80bb9d7 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-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* src/dosfs/msdos_file.c (msdos_file_read, msdos_file_write):
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);