Commit 8af87188 authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBI: rename block device ioctls

Rename the UBI_IOCVOLATTBLK and UBI_IOCVOLDETBLK to UBI_IOCVOLCRBLK and
UBI_IOCVOLRMBLK, because we do not use terms "attach" and "detach" for the R/O
block devices on top of UBI volumes. Instead, we use terms "create" and
"remove". This patch also amends the related commentaries.
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
parent 80744cc9
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
* This feature is compiled in the UBI core, and adds a 'block' parameter * This feature is compiled in the UBI core, and adds a 'block' parameter
* to allow early creation of block devices on top of UBI volumes. Runtime * to allow early creation of block devices on top of UBI volumes. Runtime
* block creation/removal for UBI volumes is provided through two UBI ioctls: * block creation/removal for UBI volumes is provided through two UBI ioctls:
* UBI_IOCVOLATTBLK and UBI_IOCVOLDETBLK. * UBI_IOCVOLCRBLK and UBI_IOCVOLRMBLK.
*/ */
#include <linux/module.h> #include <linux/module.h>
......
...@@ -561,8 +561,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd, ...@@ -561,8 +561,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd,
break; break;
} }
/* Attach a block device to an UBI volume */ /* Create a R/O block device on top of the UBI volume */
case UBI_IOCVOLATTBLK: case UBI_IOCVOLCRBLK:
{ {
struct ubi_volume_info vi; struct ubi_volume_info vi;
...@@ -571,8 +571,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd, ...@@ -571,8 +571,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd,
break; break;
} }
/* Dettach a block device from an UBI volume */ /* Remove the R/O block device */
case UBI_IOCVOLDETBLK: case UBI_IOCVOLRMBLK:
{ {
struct ubi_volume_info vi; struct ubi_volume_info vi;
......
...@@ -138,9 +138,9 @@ ...@@ -138,9 +138,9 @@
* Block devices on UBI volumes * Block devices on UBI volumes
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* *
* To attach or detach a block device from an UBI volume the %UBI_IOCVOLATTBLK * To create or remove a R/O block device on top of an UBI volume the
* and %UBI_IOCVOLDETBLK ioctl commands should be used, respectively. * %UBI_IOCVOLCRBLK and %UBI_IOCVOLRMBLK ioctl commands should be used,
* These commands take no arguments. * respectively. These commands take no arguments.
*/ */
/* /*
...@@ -198,10 +198,10 @@ ...@@ -198,10 +198,10 @@
/* Set an UBI volume property */ /* Set an UBI volume property */
#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \ #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \
struct ubi_set_vol_prop_req) struct ubi_set_vol_prop_req)
/* Attach a block device to an UBI volume */ /* Create a R/O block device on top of an UBI volume */
#define UBI_IOCVOLATTBLK _IO(UBI_VOL_IOC_MAGIC, 7) #define UBI_IOCVOLCRBLK _IO(UBI_VOL_IOC_MAGIC, 7)
/* Detach a block device from an UBI volume */ /* Remove the R/O block device */
#define UBI_IOCVOLDETBLK _IO(UBI_VOL_IOC_MAGIC, 8) #define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8)
/* Maximum MTD device name length supported by UBI */ /* Maximum MTD device name length supported by UBI */
#define MAX_UBI_MTD_NAME_LEN 127 #define MAX_UBI_MTD_NAME_LEN 127
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment