summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/src/blkdev.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2008-07-29 02:21:15 +0000
committerChris Johns <chrisj@rtems.org>2008-07-29 02:21:15 +0000
commit3899a5379f4bfa067e73b4612a547a308a6634ec (patch)
treef837533ace01e934da6089cdca360822d85cc662 /cpukit/libblock/src/blkdev.c
parent2008-07-27 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-3899a5379f4bfa067e73b4612a547a308a6634ec.tar.bz2
2008-07-29 Chris Johns <chrisj@rtems.org>
* libblock/Makefile.am: Removed src/show_bdbuf.c. * libblock/src/show_bdbuf.c: Removed. * libblock/include/rtems/bdbuf.h, cpukit/libblock/src/bdbuf.c: Rewritten the bdbuf code. Remove pre-emption disable, score access, fixed many bugs and increased performance. * libblock/include/rtems/blkdev.h: Added RTEMS_BLKDEV_CAPABILITIES block device request. Cleaned up comments. Added block and user fields to the sg buffer request. Move to rtems_* namespace. * libblock/include/rtems/diskdevs.h, cpukit/libblock/src/diskdevs.c: Move to rtems_* namespace. Add a capabilities field for drivers. Change rtems_disk_lookup to rtems_disk_obtain to match the release call. You do not lookup and release a disk, you obtain and release a disk. * libblock/include/rtems/ide_part_table.h, libblock/include/rtems/ramdisk.h, libblock/src/ide_part_table.c: Move to rtems_* namespace. * libblock/include/rtems/nvdisk.h: Formatting change. * libblock/src/blkdev.c: Move to rtems_* namespace. Change rtems_disk_lookup to rtems_disk_obtain * libblock/src/flashdisk.c: Move to rtems_* namespace. Use the new support for the block number in the scatter/grather request struct. This allows non-continuous buffer requests for those drivers that can support increasing performance. * libblock/src/nvdisk.c: Move to rtems_* namespace. Removed warnings. Added better error checking. Fixed some comments. * libblock/src/ramdisk.c: Move to rtems_* namespace. Added some trace functions to help debugging upper layers. Use the new support for the block number in the scatter/grather request struct. This allows non-continuous buffer requests for those drivers that can support increasing performance. * libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h: Use new chains API. Removed temporary hack and changed set_errno_and_return_minus_one to rtems_set_errno_and_return_minus_one. Move fat_buf_access from header and stopped it being inlined. Updated to libblock changes. * libfs/src/dosfs/fat_fat_operations.c, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_eval.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_free.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_mknod.c: Use new chains API. Removed temporary hack and changed set_errno_and_return_minus_one to rtems_set_errno_and_return_minus_one. Updated to libblock changes. * libmisc/Makefile.am: Add new ls and rm command files. * libmisc/shell/cmp-ls.c, libmisc/shell/extern-ls.h, libmisc/shell/filemode.c, libmisc/shell/print-ls.c, libmisc/shell/pwcache.c, libmisc/shell/utils-ls.c, libmisc/shell/vis.c, shell/vis.h: New. * libmisc/shell/extern-cp.h, libmisc/shell/main_cp.c, libmisc/shell/utils-cp.c: Fixed the usage call bug. * libmisc/shell/main_blksync.c: Updated to the new block IO ioctl command. * libmisc/shell/main_ls.c, libmisc/shell/main_rm.c: Updated to BSD commands with more features. * score/src/coremutex.c: Fix the strick order mutex code. * libmisc/shell/shell.c: Change shell tasks mode to be timeslice and no ASR. * sapi/include/confdefs.h: Change ata_driver_task_priority to rtems_ata_driver_task_priority. Add the new BD buf cache parameters with defaults. * score/src/interr.c: Do not return if the CPU halt call returns.
Diffstat (limited to 'cpukit/libblock/src/blkdev.c')
-rw-r--r--cpukit/libblock/src/blkdev.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/cpukit/libblock/src/blkdev.c b/cpukit/libblock/src/blkdev.c
index e133e5eaf2..a93875c9a2 100644
--- a/cpukit/libblock/src/blkdev.c
+++ b/cpukit/libblock/src/blkdev.c
@@ -38,10 +38,10 @@ rtems_blkdev_generic_read(
unsigned int block;
unsigned int blkofs;
dev_t dev;
- disk_device *dd;
+ rtems_disk_device *dd;
dev = rtems_filesystem_make_dev_t(major, minor);
- dd = rtems_disk_lookup(dev);
+ dd = rtems_disk_obtain(dev);
if (dd == NULL)
return RTEMS_INVALID_NUMBER;
@@ -57,7 +57,7 @@ rtems_blkdev_generic_read(
while (count > 0)
{
- bdbuf_buffer *diskbuf;
+ rtems_bdbuf_buffer *diskbuf;
int copy;
rtems_status_code rc;
@@ -99,10 +99,10 @@ rtems_blkdev_generic_write(
unsigned int blkofs;
dev_t dev;
rtems_status_code rc;
- disk_device *dd;
+ rtems_disk_device *dd;
dev = rtems_filesystem_make_dev_t(major, minor);
- dd = rtems_disk_lookup(dev);
+ dd = rtems_disk_obtain(dev);
if (dd == NULL)
return RTEMS_INVALID_NUMBER;
@@ -118,7 +118,7 @@ rtems_blkdev_generic_write(
while (count > 0)
{
- bdbuf_buffer *diskbuf;
+ rtems_bdbuf_buffer *diskbuf;
int copy;
if ((blkofs == 0) && (count >= block_size))
@@ -156,10 +156,10 @@ rtems_blkdev_generic_open(
void * arg)
{
dev_t dev;
- disk_device *dd;
+ rtems_disk_device *dd;
dev = rtems_filesystem_make_dev_t(major, minor);
- dd = rtems_disk_lookup(dev);
+ dd = rtems_disk_obtain(dev);
if (dd == NULL)
return RTEMS_INVALID_NUMBER;
@@ -181,10 +181,10 @@ rtems_blkdev_generic_close(
void * arg)
{
dev_t dev;
- disk_device *dd;
+ rtems_disk_device *dd;
dev = rtems_filesystem_make_dev_t(major, minor);
- dd = rtems_disk_lookup(dev);
+ dd = rtems_disk_obtain(dev);
if (dd == NULL)
return RTEMS_INVALID_NUMBER;
@@ -206,32 +206,32 @@ rtems_blkdev_generic_ioctl(
{
rtems_libio_ioctl_args_t *args = arg;
dev_t dev;
- disk_device *dd;
+ rtems_disk_device *dd;
int rc;
dev = rtems_filesystem_make_dev_t(major, minor);
- dd = rtems_disk_lookup(dev);
+ dd = rtems_disk_obtain(dev);
if (dd == NULL)
return RTEMS_INVALID_NUMBER;
switch (args->command)
{
- case BLKIO_GETBLKSIZE:
+ case RTEMS_BLKIO_GETBLKSIZE:
args->ioctl_return = dd->block_size;
break;
- case BLKIO_GETSIZE:
+ case RTEMS_BLKIO_GETSIZE:
args->ioctl_return = dd->size;
break;
- case BLKIO_SYNCDEV:
+ case RTEMS_BLKIO_SYNCDEV:
rc = rtems_bdbuf_syncdev(dd->dev);
args->ioctl_return = (rc == RTEMS_SUCCESSFUL ? 0 : -1);
break;
- case BLKIO_REQUEST:
+ case RTEMS_BLKIO_REQUEST:
{
- blkdev_request *req = args->buffer;
+ rtems_blkdev_request *req = args->buffer;
req->start += dd->start;
args->ioctl_return = dd->ioctl(dd->phys_dev->dev, args->command,
req);