Index: cpukit/libblock/include/rtems/bdbuf.h
===================================================================
--- cpukit/libblock/include/rtems/bdbuf.h	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ cpukit/libblock/include/rtems/bdbuf.h	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -491,5 +491,5 @@
 rtems_status_code
 rtems_bdbuf_get (
-  const rtems_disk_device *dd,
+  rtems_disk_device *dd,
   rtems_blkdev_bnum block,
   rtems_bdbuf_buffer** bd
@@ -525,5 +525,5 @@
 rtems_status_code
 rtems_bdbuf_read (
-  const rtems_disk_device *dd,
+  rtems_disk_device *dd,
   rtems_blkdev_bnum block,
   rtems_bdbuf_buffer** bd
@@ -617,5 +617,5 @@
  */
 rtems_status_code
-rtems_bdbuf_syncdev (const rtems_disk_device *dd);
+rtems_bdbuf_syncdev (rtems_disk_device *dd);
 
 /**
@@ -631,5 +631,5 @@
  */
 void
-rtems_bdbuf_purge_dev (const rtems_disk_device *dd);
+rtems_bdbuf_purge_dev (rtems_disk_device *dd);
 
 /**
Index: cpukit/libblock/include/rtems/bdpart.h
===================================================================
--- cpukit/libblock/include/rtems/bdpart.h	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ cpukit/libblock/include/rtems/bdpart.h	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -401,5 +401,5 @@
   const char *disk_name,
   int *fd_ptr,
-  const rtems_disk_device **dd_ptr,
+  rtems_disk_device **dd_ptr,
   rtems_blkdev_bnum *disk_end
 );
Index: cpukit/libblock/include/rtems/blkdev.h
===================================================================
--- cpukit/libblock/include/rtems/blkdev.h	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ cpukit/libblock/include/rtems/blkdev.h	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -193,5 +193,5 @@
 static inline int rtems_disk_fd_get_disk_device(
   int fd,
-  const rtems_disk_device **dd_ptr
+  rtems_disk_device **dd_ptr
 )
 {
Index: cpukit/libblock/src/bdbuf.c
===================================================================
--- cpukit/libblock/src/bdbuf.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ cpukit/libblock/src/bdbuf.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -1775,5 +1775,5 @@
 
 rtems_status_code
-rtems_bdbuf_get (const rtems_disk_device *dd,
+rtems_bdbuf_get (rtems_disk_device   *dd,
                  rtems_blkdev_bnum    block,
                  rtems_bdbuf_buffer **bd_ptr)
@@ -1993,5 +1993,5 @@
 
 rtems_status_code
-rtems_bdbuf_read (const rtems_disk_device *dd,
+rtems_bdbuf_read (rtems_disk_device   *dd,
                   rtems_blkdev_bnum    block,
                   rtems_bdbuf_buffer **bd_ptr)
@@ -2177,5 +2177,5 @@
 
 rtems_status_code
-rtems_bdbuf_syncdev (const rtems_disk_device *dd)
+rtems_bdbuf_syncdev (rtems_disk_device *dd)
 {
   if (rtems_bdbuf_tracer)
@@ -2878,5 +2878,5 @@
 
 void
-rtems_bdbuf_purge_dev (const rtems_disk_device *dd)
+rtems_bdbuf_purge_dev (rtems_disk_device *dd)
 {
   rtems_chain_control purge_list;
Index: cpukit/libblock/src/bdpart-read.c
===================================================================
--- cpukit/libblock/src/bdpart-read.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ cpukit/libblock/src/bdpart-read.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -69,5 +69,5 @@
   const char *disk_name,
   int *fd_ptr,
-  const rtems_disk_device **dd_ptr,
+  rtems_disk_device **dd_ptr,
   rtems_blkdev_bnum *disk_end
 )
@@ -76,5 +76,5 @@
   int rv = 0;
   int fd = -1;
-  const rtems_disk_device *dd = NULL;
+  rtems_disk_device *dd = NULL;
   rtems_blkdev_bnum disk_begin = 0;
   rtems_blkdev_bnum block_size = 0;
@@ -186,5 +186,5 @@
 
 static rtems_status_code rtems_bdpart_read_record(
-  const rtems_disk_device *dd,
+  rtems_disk_device *dd,
   rtems_blkdev_bnum index,
   rtems_bdbuf_buffer **block
@@ -238,5 +238,5 @@
   const uint8_t *data = NULL;
   int fd = -1;
-  const rtems_disk_device *dd = NULL;
+  rtems_disk_device *dd = NULL;
 
   /* Check parameter */
Index: cpukit/libblock/src/bdpart-register.c
===================================================================
--- cpukit/libblock/src/bdpart-register.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ cpukit/libblock/src/bdpart-register.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -49,5 +49,5 @@
   size_t i = 0;
   int fd = -1;
-  const rtems_disk_device *dd = NULL;
+  rtems_disk_device *dd = NULL;
 
   /* Get disk data */
@@ -140,5 +140,5 @@
   size_t i = 0;
   int fd = -1;
-  const rtems_disk_device *dd = NULL;
+  rtems_disk_device *dd = NULL;
 
   /* Get disk data */
Index: cpukit/libblock/src/bdpart-write.c
===================================================================
--- cpukit/libblock/src/bdpart-write.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ cpukit/libblock/src/bdpart-write.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -46,5 +46,5 @@
 
 static rtems_status_code rtems_bdpart_new_record(
-  const rtems_disk_device *dd,
+  rtems_disk_device *dd,
   rtems_blkdev_bnum index,
   rtems_bdbuf_buffer **block
@@ -104,5 +104,5 @@
   uint8_t *data = NULL;
   int fd = -1;
-  const rtems_disk_device *dd = NULL;
+  rtems_disk_device *dd = NULL;
 
   /* Check if we have something to do */
Index: cpukit/libblock/src/blkdev-imfs.c
===================================================================
--- cpukit/libblock/src/blkdev-imfs.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ cpukit/libblock/src/blkdev-imfs.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -39,6 +39,6 @@
 {
   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;
@@ -93,6 +93,6 @@
 {
   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;
@@ -175,7 +175,7 @@
 )
 {
-  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);
@@ -191,6 +191,6 @@
 {
   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);
 
@@ -333,5 +333,5 @@
       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);
Index: testsuites/fstests/fsbdpart01/init.c
===================================================================
--- testsuites/fstests/fsbdpart01/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/fstests/fsbdpart01/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -81,5 +81,5 @@
 
     if (exists) {
-      const rtems_disk_device *dd = NULL;
+      rtems_disk_device *dd = NULL;
       int rv = 0;
 
Index: testsuites/libtests/block01/init.c
===================================================================
--- testsuites/libtests/block01/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block01/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -49,5 +49,5 @@
   rtems_status_code sc = RTEMS_SUCCESSFUL;
   rtems_disk_device *dd = NULL;
-  const rtems_disk_device *fd_dd = NULL;
+  rtems_disk_device *fd_dd = NULL;
   int fd = -1;
   int rv = -1;
Index: testsuites/libtests/block02/init.c
===================================================================
--- testsuites/libtests/block02/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block02/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -53,7 +53,7 @@
 #define BLOCK_COUNT_B 1
 
-static const rtems_disk_device *dd_a;
-
-static const rtems_disk_device *dd_b;
+static rtems_disk_device *dd_a;
+
+static rtems_disk_device *dd_b;
 
 static volatile bool sync_done = false;
Index: testsuites/libtests/block03/init.c
===================================================================
--- testsuites/libtests/block03/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block03/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -49,5 +49,5 @@
 #define BLOCK_COUNT 2
 
-static const rtems_disk_device *dd;
+static rtems_disk_device *dd;
 
 static volatile bool sync_done = false;
Index: testsuites/libtests/block04/init.c
===================================================================
--- testsuites/libtests/block04/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block04/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -49,5 +49,5 @@
 #define BLOCK_COUNT 1
 
-static const rtems_disk_device *dd;
+static rtems_disk_device *dd;
 
 static rtems_id task_id_low;
Index: testsuites/libtests/block05/init.c
===================================================================
--- testsuites/libtests/block05/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block05/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -61,7 +61,7 @@
 static unsigned output_level = 0;
 
-static const rtems_disk_device *dd_a;
-
-static const rtems_disk_device *dd_b;
+static rtems_disk_device *dd_a;
+
+static rtems_disk_device *dd_b;
 
 static rtems_id task_id_init;
@@ -394,5 +394,5 @@
   uint32_t block_size,
   rtems_blkdev_bnum block_count,
-  const rtems_disk_device **dd_ptr
+  rtems_disk_device **dd_ptr
 )
 {
Index: testsuites/libtests/block06/init.c
===================================================================
--- testsuites/libtests/block06/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block06/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -109,5 +109,5 @@
   rtems_device_minor_number minor;
   bool                      passed;
-  const rtems_disk_device  *dd;
+  rtems_disk_device        *dd;
 } bdbuf_task_control;
 
@@ -346,5 +346,5 @@
                          rtems_id                  master,
                          rtems_device_major_number major,
-                         const rtems_disk_device  *dd)
+                         rtems_disk_device        *dd)
 {
   char name[6];
@@ -615,6 +615,6 @@
 
 static bool
-bdbuf_tests_setup_disk (rtems_device_major_number* major,
-                        const rtems_disk_device **dd_ptr)
+bdbuf_tests_setup_disk (rtems_device_major_number *major,
+                        rtems_disk_device        **dd_ptr)
 {
   rtems_status_code sc;
@@ -1766,5 +1766,5 @@
   int                       t;
   bool                      passed = true;
-  const rtems_disk_device *dd;
+  rtems_disk_device        *dd;
 
   /*
Index: testsuites/libtests/block08/bdbuf_tests.c
===================================================================
--- testsuites/libtests/block08/bdbuf_tests.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block08/bdbuf_tests.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -48,5 +48,5 @@
 
 /** Device ID used for testing */
-const rtems_disk_device *test_dd = NULL;
+rtems_disk_device *test_dd = NULL;
 
 /** Test result variable */
Index: testsuites/libtests/block08/bdbuf_tests.h
===================================================================
--- testsuites/libtests/block08/bdbuf_tests.h	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block08/bdbuf_tests.h	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -151,5 +151,5 @@
 
 /** Device ID used for testing */
-extern const rtems_disk_device *test_dd;
+extern rtems_disk_device *test_dd;
 
 /**
Index: testsuites/libtests/block09/init.c
===================================================================
--- testsuites/libtests/block09/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block09/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -144,5 +144,5 @@
 
 static void check_read(
-  const rtems_disk_device *dd,
+  rtems_disk_device *dd,
   rtems_blkdev_bnum block,
   rtems_status_code expected_sc
Index: testsuites/libtests/block10/init.c
===================================================================
--- testsuites/libtests/block10/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block10/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -56,5 +56,5 @@
 typedef void (*release_func)(char task, rtems_bdbuf_buffer *bd);
 
-static const rtems_disk_device *dd;
+static rtems_disk_device *dd;
 
 static rtems_id task_id_init;
Index: testsuites/libtests/block11/init.c
===================================================================
--- testsuites/libtests/block11/init.c	(revision b6911069d42381b89505803e2c699b4271c25e96)
+++ testsuites/libtests/block11/init.c	(revision 40284de8443df5e8f60420c11d2dcac09b6befb1)
@@ -158,5 +158,5 @@
   ramdisk *rd;
   int fd;
-  const rtems_disk_device *dd;
+  rtems_disk_device *dd;
   struct stat st;
 
