summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubiformat.c
diff options
context:
space:
mode:
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;
}