diff options
-rw-r--r-- | cpukit/libblock/include/rtems/blkdev.h | 1 | ||||
-rw-r--r-- | cpukit/libblock/src/blkdev.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/libblock/include/rtems/blkdev.h b/cpukit/libblock/include/rtems/blkdev.h index e9fa86b248..978e93056f 100644 --- a/cpukit/libblock/include/rtems/blkdev.h +++ b/cpukit/libblock/include/rtems/blkdev.h @@ -161,6 +161,7 @@ typedef struct rtems_blkdev_request { #define RTEMS_BLKIO_SYNCDEV _IO('B', 6) #define RTEMS_BLKIO_DELETED _IO('B', 7) #define RTEMS_BLKIO_CAPABILITIES _IO('B', 8) +#define RTEMS_BLKIO_GETDISKDEV _IOR('B', 9, rtems_disk_device *) /** @} */ diff --git a/cpukit/libblock/src/blkdev.c b/cpukit/libblock/src/blkdev.c index 10c14dfaf2..c986e69889 100644 --- a/cpukit/libblock/src/blkdev.c +++ b/cpukit/libblock/src/blkdev.c @@ -211,6 +211,11 @@ rtems_blkdev_generic_ioctl( args->ioctl_return = (uint32_t) (rc == RTEMS_SUCCESSFUL ? 0 : -1); break; + case RTEMS_BLKIO_GETDISKDEV: + *((rtems_disk_device **) args->buffer) = dd; + args->ioctl_return = 0; + break; + case RTEMS_BLKIO_REQUEST: /* * It is not allowed to directly access the driver circumventing |