aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-06-14 07:55:14 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-06-14 08:03:42 +0300
commitc7298da85e0e249ba237dcf158ec3e158e54fd40 (patch)
tree152869b98a16d94fb239bf92d1c8fbccad146119 /ubi-utils/src
parentf8925c17b43d84cb6f56106e4ee2e10ee16b1a2a (diff)
libubi: provide mtd number in UBI device information
Add an 'mtd_num' field to the UBI device information structure. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src')
-rw-r--r--ubi-utils/src/libubi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ubi-utils/src/libubi.c b/ubi-utils/src/libubi.c
index 100f557..3fe7956 100644
--- a/ubi-utils/src/libubi.c
+++ b/ubi-utils/src/libubi.c
@@ -1193,6 +1193,8 @@ int ubi_get_dev_info1(libubi_t desc, int dev_num, struct ubi_dev_info *info)
if (dev_get_major(lib, dev_num, &info->major, &info->minor))
return -1;
+ if (dev_read_int(lib->dev_mtd_num, dev_num, &info->mtd_num))
+ return -1;
if (dev_read_int(lib->dev_avail_ebs, dev_num, &info->avail_lebs))
return -1;
if (dev_read_int(lib->dev_total_ebs, dev_num, &info->total_lebs))