summaryrefslogtreecommitdiff
path: root/ubi-utils/include/libubi.h
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>2014-03-14 11:25:24 -0300
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-03-25 09:54:48 +0200
commit6a9db93c239ff61412ba6629919b4411d836ae23 (patch)
tree5aa80cf857d2429f1687b6f275fee626005958b7 /ubi-utils/include/libubi.h
parentdcea43eba91642939c82739387147da26d572758 (diff)
ubi-utils: Add ubiblock tool
With the addition of block device access to UBI volumes, we now add a simple userspace tool to access the new ioctls. Usage of this tool is as simple as it gets: $ ubiblock --create /dev/ubi0_0 will create a new block device /dev/ubiblock0_0, and $ ubiblock --remove /dev/ubi0_0 will remove the device. Artem: slightly changed the header comment. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'ubi-utils/include/libubi.h')
-rw-r--r--ubi-utils/include/libubi.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ubi-utils/include/libubi.h b/ubi-utils/include/libubi.h
index 47f40e2..4d6a7ee 100644
--- a/ubi-utils/include/libubi.h
+++ b/ubi-utils/include/libubi.h
@@ -400,6 +400,22 @@ int ubi_get_vol_info1_nm(libubi_t desc, int dev_num, const char *name,
struct ubi_vol_info *info);
/**
+ * ubi_vol_block_create - create a block device on top of an UBI volume.
+ * @fd: volume character device file descriptor
+ *
+ * Returns %0 in case of success and %-1 in case of failure.
+ */
+int ubi_vol_block_create(int fd);
+
+/**
+ * ubi_vol_block_remove - remove a block device from an UBI volume.
+ * @fd: volume character device file descriptor
+ *
+ * Returns %0 in case of success and %-1 in case of failure.
+ */
+int ubi_vol_block_remove(int fd);
+
+/**
* ubi_update_start - start UBI volume update.
* @desc: UBI library descriptor
* @fd: volume character device file descriptor