summaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-08-09 14:36:43 -0700
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-08-16 17:12:38 +0300
commitd53c03b0989f8354a7e4dbb947a150fc7fe3f6d1 (patch)
tree5fa739c6c91cddb5ea120734e3e557bf294b0089 /ubi-utils
parent8faa32ae07b0fce0636f6e57d9dd4a93db0ebc13 (diff)
mtdinfo: refactor code to remove "args.all" dependency
Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/mtdinfo.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c
index b4a2f4c..0a20c76 100644
--- a/ubi-utils/mtdinfo.c
+++ b/ubi-utils/mtdinfo.c
@@ -338,8 +338,7 @@ static int print_dev_info(libmtd_t libmtd, const struct mtd_info *mtd_info, int
return 0;
}
-static int print_general_info(libmtd_t libmtd, const struct mtd_info *mtd_info,
- int all)
+static int print_general_info(libmtd_t libmtd, const struct mtd_info *mtd_info)
{
int i, err, first = 1;
struct mtd_dev_info mtd;
@@ -366,15 +365,9 @@ static int print_general_info(libmtd_t libmtd, const struct mtd_info *mtd_info,
}
}
printf("\n");
- printf("Sysfs interface supported: %s\n",
+ printf("Sysfs interface supported: %s\n\n",
mtd_info->sysfs_supported ? "yes" : "no");
- if (!all)
- return 0;
-
- first = 1;
- printf("\n");
-
for (i = mtd_info->lowest_mtd_num;
i <= mtd_info->highest_mtd_num; i++) {
err = print_dev_info(libmtd, mtd_info, i);
@@ -421,7 +414,7 @@ int main(int argc, char * const argv[])
goto out_libmtd;
err = print_dev_info(libmtd, &mtd_info, mtdn);
} else
- err = print_general_info(libmtd, &mtd_info, args.all);
+ err = print_general_info(libmtd, &mtd_info);
if (err)
goto out_libmtd;