summaryrefslogtreecommitdiff
path: root/ubi-utils/mtdinfo.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-09-01 15:27:38 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-11-17 11:36:56 +0100
commitf4ec4511d0729802e783b1757d6bcd556737510e (patch)
treede44ef5941b606e5ad5ac86ee4eba37013c8c863 /ubi-utils/mtdinfo.c
parentdbb13d2f0eba1770a96cac537218e7625556e172 (diff)
Merge rest of ubiutils-common into libmtd common
This patch moves the remaining 3 functions from ubiutils-common.{c,h} into libmtd common.{c,h}. The functions are only generic utility functions that other mtd-utils programs may also find usefull and every program that uses libubi links against libmtd anyway so there is no real reason for keeping around a seperate ubiutils-common with only generic helper functions. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubi-utils/mtdinfo.c')
-rw-r--r--ubi-utils/mtdinfo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c
index a86abd1..11e59c1 100644
--- a/ubi-utils/mtdinfo.c
+++ b/ubi-utils/mtdinfo.c
@@ -34,7 +34,6 @@
#include <libubigen.h>
#include <libmtd.h>
#include "common.h"
-#include "ubiutils-common.h"
/* The variables below are set by command line arguments */
struct args {
@@ -172,7 +171,7 @@ static void print_ubi_info(const struct mtd_info *mtd_info,
printf("Default UBI VID header offset: %d\n", ui.vid_hdr_offs);
printf("Default UBI data offset: %d\n", ui.data_offs);
printf("Default UBI LEB size: ");
- ubiutils_print_bytes(ui.leb_size, 0);
+ util_print_bytes(ui.leb_size, 0);
printf("\n");
printf("Maximum UBI volumes count: %d\n", ui.max_volumes);
}
@@ -306,10 +305,10 @@ static int print_dev_info(libmtd_t libmtd, const struct mtd_info *mtd_info, int
printf("Name: %s\n", mtd.name);
printf("Type: %s\n", mtd.type_str);
printf("Eraseblock size: ");
- ubiutils_print_bytes(mtd.eb_size, 0);
+ util_print_bytes(mtd.eb_size, 0);
printf("\n");
printf("Amount of eraseblocks: %d (", mtd.eb_cnt);
- ubiutils_print_bytes(mtd.size, 0);
+ util_print_bytes(mtd.size, 0);
printf(")\n");
printf("Minimum input/output unit size: %d %s\n",
mtd.min_io_size, mtd.min_io_size > 1 ? "bytes" : "byte");