summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubiformat.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-04-26 08:19:42 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-05-08 19:07:26 +0300
commitc900dff50cb7a6c21194aacd0ef2bfe734f7de8e (patch)
tree0f961a50051784d9ba38f7cdef31950e50070b31 /ubi-utils/src/ubiformat.c
parentff17b78ed0e37eb288460d87873599eae748cde7 (diff)
libmtd: rename num field
This is a preparation for the coming sysfs support. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/ubiformat.c')
-rw-r--r--ubi-utils/src/ubiformat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ubi-utils/src/ubiformat.c b/ubi-utils/src/ubiformat.c
index b64d187..1c201a6 100644
--- a/ubi-utils/src/ubiformat.c
+++ b/ubi-utils/src/ubiformat.c
@@ -733,7 +733,7 @@ int main(int argc, char * const argv[])
mtd.subpage_size = args.subpage_size;
if (!mtd.writable) {
- errmsg("mtd%d (%s) is a read-only device", mtd.num, args.node);
+ errmsg("mtd%d (%s) is a read-only device", mtd.dev_num, args.node);
goto out;
}
@@ -742,17 +742,17 @@ int main(int argc, char * const argv[])
if (libubi) {
int ubi_dev_num;
- err = mtd_num2ubi_dev(libubi, mtd.num, &ubi_dev_num);
+ err = mtd_num2ubi_dev(libubi, mtd.dev_num, &ubi_dev_num);
libubi_close(libubi);
if (!err) {
errmsg("please, first detach mtd%d (%s) from ubi%d",
- mtd.num, args.node, ubi_dev_num);
+ mtd.dev_num, args.node, ubi_dev_num);
goto out;
}
}
if (!args.quiet) {
- normsg_cont("mtd%d (%s), size ", mtd.num, mtd.type_str);
+ normsg_cont("mtd%d (%s), size ", mtd.dev_num, mtd.type_str);
ubiutils_print_bytes(mtd.size, 1);
printf(", %d eraseblocks of ", mtd.eb_size);
ubiutils_print_bytes(mtd.eb_size, 1);
@@ -767,7 +767,7 @@ int main(int argc, char * const argv[])
verbose = 1;
err = ubi_scan(&mtd, args.node_fd, &si, verbose);
if (err) {
- errmsg("failed to scan mtd%d (%s)", mtd.num, args.node);
+ errmsg("failed to scan mtd%d (%s)", mtd.dev_num, args.node);
goto out;
}
@@ -777,7 +777,7 @@ int main(int argc, char * const argv[])
}
if (si->good_cnt < 2 && (!args.novtbl || args.image)) {
- errmsg("too few non-bad eraseblocks (%d) on mtd%d", si->good_cnt, mtd.num);
+ errmsg("too few non-bad eraseblocks (%d) on mtd%d", si->good_cnt, mtd.dev_num);
goto out_free;
}