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.
This commit is contained in:
Joel Sherrill
2003-04-16 19:35:02 +00:00
parent 4a294123f6
commit 25d4218362
2 changed files with 16 additions and 0 deletions

View File

@@ -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

View File

@@ -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;