diff options
author | Richard Genoud <richard.genoud@gmail.com> | 2012-08-22 11:27:56 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-22 13:20:49 +0300 |
commit | 312e784fb06eaafff4cfebe29c74b8d0ecc09167 (patch) | |
tree | 70e8354a62c61946d8836d1eef85a8654ea49789 /ubi-utils | |
parent | 3a814dbfbfb44e8f1805592921b4f39fe0391723 (diff) |
UBI: sync ubi-user.h with kernel v3.6-rc1
Also remove the eraseblock type support, because kernel commit
a65a0eb6d198e058687a9214683bd1c418f20d39 set the dtype
parameter as obsolete.
Also adjust to some renames:
* 'UBI_PROP_DIRECT_WRITE' -> 'UBI_VOL_PROP_DIRECT_WRITE'
* 'struct ubi_set_prop_req' -> 'struct ubi_set_vol_prop_req'.
* 'UBI_IOCSETPROP' -> 'UBI_IOCSETVOLPROP'
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'ubi-utils')
-rw-r--r-- | ubi-utils/include/libubi.h | 5 | ||||
-rw-r--r-- | ubi-utils/libubi.c | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/ubi-utils/include/libubi.h b/ubi-utils/include/libubi.h index dc03d02..11a186b 100644 --- a/ubi-utils/include/libubi.h +++ b/ubi-utils/include/libubi.h @@ -426,18 +426,17 @@ int ubi_update_start(libubi_t desc, int fd, long long bytes); * @fd: volume character device file descriptor * @lnum: LEB number to change * @bytes: how many bytes of new data will be written to the LEB - * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) * * This function initiates atomic LEB change operation and returns %0 in case * of success and %-1 in case of error. he caller is assumed to write @bytes * data to the volume @fd afterward. */ -int ubi_leb_change_start(libubi_t desc, int fd, int lnum, int bytes, int dtype); +int ubi_leb_change_start(libubi_t desc, int fd, int lnum, int bytes); /** * ubi_set_property - set volume propety. * @fd: volume character device file descriptor - * @property: the property to change (%UBI_PROP_DIRECT_WRITE, etc) + * @property: the property to change (%UBI_VOL_PROP_DIRECT_WRITE, etc) * @value: new value of the changed property * * This function changes a property of a volume. Returns zero in case of diff --git a/ubi-utils/libubi.c b/ubi-utils/libubi.c index c898e36..7736dd4 100644 --- a/ubi-utils/libubi.c +++ b/ubi-utils/libubi.c @@ -1106,7 +1106,7 @@ 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) +int ubi_leb_change_start(libubi_t desc, int fd, int lnum, int bytes) { struct ubi_leb_change_req req; @@ -1114,7 +1114,7 @@ int ubi_leb_change_start(libubi_t desc, int fd, int lnum, int bytes, int dtype) memset(&req, 0, sizeof(struct ubi_leb_change_req)); req.lnum = lnum; req.bytes = bytes; - req.dtype = dtype; + req.dtype = 3; if (ioctl(fd, UBI_IOCEBCH, &req)) return -1; @@ -1346,13 +1346,13 @@ int ubi_get_vol_info1_nm(libubi_t desc, int dev_num, const char *name, int ubi_set_property(int fd, uint8_t property, uint64_t value) { - struct ubi_set_prop_req r; + struct ubi_set_vol_prop_req r; - memset(&r, 0, sizeof(struct ubi_set_prop_req)); + memset(&r, 0, sizeof(struct ubi_set_vol_prop_req)); r.property = property; r.value = value; - return ioctl(fd, UBI_IOCSETPROP, &r); + return ioctl(fd, UBI_IOCSETVOLPROP, &r); } int ubi_leb_unmap(int fd, int lnum) |