From c900dff50cb7a6c21194aacd0ef2bfe734f7de8e Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Sun, 26 Apr 2009 08:19:42 +0300 Subject: libmtd: rename num field This is a preparation for the coming sysfs support. Signed-off-by: Artem Bityutskiy --- ubi-utils/src/ubiformat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ubi-utils/src/ubiformat.c') 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; } -- cgit v1.2.3