diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-05-30 12:43:56 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-05-31 11:05:48 +0200 |
commit | 40284de8443df5e8f60420c11d2dcac09b6befb1 (patch) | |
tree | 0df3c57102c41b5dcf3b71144c73f4ef0b750e5f /cpukit/libblock/src/blkdev-imfs.c | |
parent | libblock: Add task stack size bdbuf configuration (diff) | |
download | rtems-40284de8443df5e8f60420c11d2dcac09b6befb1.tar.bz2 |
libblock: Remove const qualifier from bdbuf API
This allows addtion of per disk statistics for example.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libblock/src/blkdev-imfs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cpukit/libblock/src/blkdev-imfs.c b/cpukit/libblock/src/blkdev-imfs.c index c69542d531..c159ca3abe 100644 --- a/cpukit/libblock/src/blkdev-imfs.c +++ b/cpukit/libblock/src/blkdev-imfs.c @@ -38,8 +38,8 @@ static ssize_t rtems_blkdev_imfs_read( ) { int rv; - const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop); - const rtems_disk_device *dd = &ctx->dd; + rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop); + rtems_disk_device *dd = &ctx->dd; ssize_t remaining = (ssize_t) count; off_t offset = iop->offset; ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd); @@ -92,8 +92,8 @@ static ssize_t rtems_blkdev_imfs_write( ) { int rv; - const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop); - const rtems_disk_device *dd = &ctx->dd; + rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop); + rtems_disk_device *dd = &ctx->dd; ssize_t remaining = (ssize_t) count; off_t offset = iop->offset; ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd); @@ -174,9 +174,9 @@ static int rtems_blkdev_imfs_fstat( struct stat *buf ) { - const rtems_blkdev_imfs_context *ctx = + rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_location(loc); - const rtems_disk_device *dd = &ctx->dd; + rtems_disk_device *dd = &ctx->dd; buf->st_rdev = rtems_disk_get_device_identifier(dd); buf->st_blksize = rtems_disk_get_block_size(dd); @@ -190,8 +190,8 @@ static int rtems_blkdev_imfs_fsync_or_fdatasync( ) { int rv = 0; - const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop); - const rtems_disk_device *dd = &ctx->dd; + rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop); + rtems_disk_device *dd = &ctx->dd; rtems_status_code sc = rtems_bdbuf_syncdev(dd); if (sc != RTEMS_SUCCESSFUL) { @@ -332,7 +332,7 @@ rtems_status_code rtems_blkdev_create_partition( if (rv == 0 && S_ISBLK(st.st_mode)) { rtems_disk_device *dd; - rv = ioctl(fd, RTEMS_BLKIO_GETDISKDEV, &dd); + rv = rtems_disk_fd_get_disk_device(fd, &dd); if (rv == 0) { rtems_blkdev_bnum device_block_count = rtems_disk_get_block_count(dd); |