summaryrefslogtreecommitdiff
path: root/ubi-utils/src/libubi.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-05-08 18:09:21 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-05-08 19:07:26 +0300
commit773d4c51ed414e01be701f3378cf9db486291a26 (patch)
tree894fd952fcfc09763678b3e31374c5cdfb562c58 /ubi-utils/src/libubi.c
parentd41747f327b260c2fb470775fb9dc78d49a4d79e (diff)
libubi: add ubi_set_property interface
This is needed for io_paral test.
Diffstat (limited to 'ubi-utils/src/libubi.c')
-rw-r--r--ubi-utils/src/libubi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ubi-utils/src/libubi.c b/ubi-utils/src/libubi.c
index 167460c..c63beeb 100644
--- a/ubi-utils/src/libubi.c
+++ b/ubi-utils/src/libubi.c
@@ -1239,3 +1239,14 @@ int ubi_get_vol_info1_nm(libubi_t desc, int dev_num, const char *name,
errno = ENOENT;
return -1;
}
+
+int ubi_set_property(int fd, uint8_t property, uint64_t value)
+{
+ struct ubi_set_prop_req r;
+
+ memset(&r, sizeof(struct ubi_set_prop_req), '\0');
+ r.property = property;
+ r.value = value;
+
+ return ioctl(fd, UBI_IOCSETPROP, &r);
+}