aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/mtdinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils/mtdinfo.c')
-rw-r--r--ubi-utils/mtdinfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c
index 7dff0de..61ce7bc 100644
--- a/ubi-utils/mtdinfo.c
+++ b/ubi-utils/mtdinfo.c
@@ -185,7 +185,7 @@ static void print_ubi_info(const struct mtd_info *mtd_info,
static void print_region_map(const struct mtd_dev_info *mtd, int fd,
const region_info_t *reginfo)
{
- unsigned long start;
+ unsigned long long start;
int i, width;
int ret_locked, errno_locked, ret_bad, errno_bad;
@@ -203,8 +203,8 @@ static void print_region_map(const struct mtd_dev_info *mtd, int fd,
ret_locked = ret_bad = errno_locked = errno_bad = 0;
for (i = 0; i < reginfo->numblocks; ++i) {
- start = reginfo->offset + i * reginfo->erasesize;
- printf(" %*i: %08lx ", width, i, start);
+ start = reginfo->offset + (unsigned long long)i * reginfo->erasesize;
+ printf(" %*i: %08llx ", width, i, start);
if (ret_locked != -1) {
ret_locked = mtd_is_locked(mtd, fd, i);