summaryrefslogtreecommitdiff
path: root/ubi-utils/src/libubi.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils/src/libubi.c')
-rw-r--r--ubi-utils/src/libubi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ubi-utils/src/libubi.c b/ubi-utils/src/libubi.c
index be06f70..023fa07 100644
--- a/ubi-utils/src/libubi.c
+++ b/ubi-utils/src/libubi.c
@@ -1012,6 +1012,21 @@ int ubi_update_start(libubi_t desc, int fd, long long bytes)
return 0;
}
+int ubi_leb_change_start(libubi_t desc, int fd, int lnum, int bytes, int dtype)
+{
+ struct ubi_leb_change_req req;
+
+ desc = desc;
+ memset(&req, 0, sizeof(struct ubi_leb_change_req));
+ req.lnum = lnum;
+ req.bytes = bytes;
+ req.dtype = dtype;
+
+ if (ioctl(fd, UBI_IOCEBCH, &req))
+ return -1;
+ return 0;
+}
+
int ubi_get_dev_info1(libubi_t desc, int dev_num, struct ubi_dev_info *info)
{
DIR *sysfs_ubi;