diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-04-16 19:35:02 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-04-16 19:35:02 +0000 |
commit | 25d4218362c50ce117e8f57e28a445eb5f98c22b (patch) | |
tree | 8a325ef56ad19a733592fccfdde35db1dfb1b52f /cpukit/libblock | |
parent | 2003-04-16 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-25d4218362c50ce117e8f57e28a445eb5f98c22b.tar.bz2 |
2002-04-10 Victor V. Vengerov <vvv@oktet.ru>
PR 385/filesystem
* src/ramdisk.c: The "from" and "to" locations are calculated as
the start of the block within the ram that data is to be transferred
from/to for reads and writes respectively. However, within
the loops, the "from" and "to" locations are never updated. The loop
should have been updated as:
from += rd->block_size;
and
to += rd->block_size;
within the for loops in the ramdisk_read and ramdisk_write routines,
respectively.
Diffstat (limited to 'cpukit/libblock')
-rw-r--r-- | cpukit/libblock/ChangeLog | 14 | ||||
-rw-r--r-- | cpukit/libblock/src/ramdisk.c | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/libblock/ChangeLog b/cpukit/libblock/ChangeLog index 49022b034a..073a505854 100644 --- a/cpukit/libblock/ChangeLog +++ b/cpukit/libblock/ChangeLog @@ -1,3 +1,17 @@ +2002-04-10 Victor V. Vengerov <vvv@oktet.ru> + + PR 385/filesystem + * src/ramdisk.c: The "from" and "to" locations are calculated as + the start of the block within the ram that data is to be transferred + from/to for reads and writes respectively. However, within + the loops, the "from" and "to" locations are never updated. The loop + should have been updated as: + from += rd->block_size; + and + to += rd->block_size; + within the for loops in the ramdisk_read and ramdisk_write routines, + respectively. + 2003-03-27 Joel Sherrill <joel@OARcorp.com> * Makefile.am: ATA code depends upon libchip/ide which is not allowed diff --git a/cpukit/libblock/src/ramdisk.c b/cpukit/libblock/src/ramdisk.c index 7be2eabcc8..99d90bd1e5 100644 --- a/cpukit/libblock/src/ramdisk.c +++ b/cpukit/libblock/src/ramdisk.c @@ -61,6 +61,7 @@ ramdisk_read(struct ramdisk *rd, blkdev_request *req) count = remains; memcpy(sg->buffer, from, count); remains -= count; + from += count; } req->req_done(req->done_arg, RTEMS_SUCCESSFUL, 0); return 0; @@ -95,6 +96,7 @@ ramdisk_write(struct ramdisk *rd, blkdev_request *req) count = remains; memcpy(to, sg->buffer, count); remains -= count; + to += count; } req->req_done(req->done_arg, RTEMS_SUCCESSFUL, 0); return 0; |