Skip to content

Commit 8af8718

Browse files
committed
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: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
1 parent 80744cc commit 8af8718

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

drivers/mtd/ubi/block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* This feature is compiled in the UBI core, and adds a 'block' parameter
3333
* to allow early creation of block devices on top of UBI volumes. Runtime
3434
* block creation/removal for UBI volumes is provided through two UBI ioctls:
35-
* UBI_IOCVOLATTBLK and UBI_IOCVOLDETBLK.
35+
* UBI_IOCVOLCRBLK and UBI_IOCVOLRMBLK.
3636
*/
3737

3838
#include <linux/module.h>

drivers/mtd/ubi/cdev.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd,
561561
break;
562562
}
563563

564-
/* Attach a block device to an UBI volume */
565-
case UBI_IOCVOLATTBLK:
564+
/* Create a R/O block device on top of the UBI volume */
565+
case UBI_IOCVOLCRBLK:
566566
{
567567
struct ubi_volume_info vi;
568568

@@ -571,8 +571,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd,
571571
break;
572572
}
573573

574-
/* Dettach a block device from an UBI volume */
575-
case UBI_IOCVOLDETBLK:
574+
/* Remove the R/O block device */
575+
case UBI_IOCVOLRMBLK:
576576
{
577577
struct ubi_volume_info vi;
578578

include/uapi/mtd/ubi-user.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@
138138
* Block devices on UBI volumes
139139
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140140
*
141-
* To attach or detach a block device from an UBI volume the %UBI_IOCVOLATTBLK
142-
* and %UBI_IOCVOLDETBLK ioctl commands should be used, respectively.
143-
* These commands take no arguments.
141+
* To create or remove a R/O block device on top of an UBI volume the
142+
* %UBI_IOCVOLCRBLK and %UBI_IOCVOLRMBLK ioctl commands should be used,
143+
* respectively. These commands take no arguments.
144144
*/
145145

146146
/*
@@ -198,10 +198,10 @@
198198
/* Set an UBI volume property */
199199
#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \
200200
struct ubi_set_vol_prop_req)
201-
/* Attach a block device to an UBI volume */
202-
#define UBI_IOCVOLATTBLK _IO(UBI_VOL_IOC_MAGIC, 7)
203-
/* Detach a block device from an UBI volume */
204-
#define UBI_IOCVOLDETBLK _IO(UBI_VOL_IOC_MAGIC, 8)
201+
/* Create a R/O block device on top of an UBI volume */
202+
#define UBI_IOCVOLCRBLK _IO(UBI_VOL_IOC_MAGIC, 7)
203+
/* Remove the R/O block device */
204+
#define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8)
205205

206206
/* Maximum MTD device name length supported by UBI */
207207
#define MAX_UBI_MTD_NAME_LEN 127

0 commit comments

Comments
 (0)