diff options
Diffstat (limited to 'ubi-utils')
-rw-r--r-- | ubi-utils/mtdinfo.c | 6 | ||||
-rw-r--r-- | ubi-utils/ubinize.c | 4 | ||||
-rw-r--r-- | ubi-utils/ubirsvol.c | 2 |
3 files changed, 6 insertions, 6 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); diff --git a/ubi-utils/ubinize.c b/ubi-utils/ubinize.c index ac8c1e5..9c950b1 100644 --- a/ubi-utils/ubinize.c +++ b/ubi-utils/ubinize.c @@ -375,8 +375,8 @@ static int read_section(const struct ubigen_info *ui, const char *sname, vi->alignment = iniparser_getint(args.dict, buf, -1); if (vi->alignment == -1) vi->alignment = 1; - else if (vi->id < 0) - return errmsg("negative volume alignment %d in section \"%s\"", + else if (vi->alignment <= 0) + return errmsg("not positive volume alignment %d in section \"%s\"", vi->alignment, sname); verbose(args.verbose, "volume alignment: %d", vi->alignment); diff --git a/ubi-utils/ubirsvol.c b/ubi-utils/ubirsvol.c index 0854abc..73d2f68 100644 --- a/ubi-utils/ubirsvol.c +++ b/ubi-utils/ubirsvol.c @@ -231,7 +231,7 @@ int main(int argc, char * const argv[]) } if (args.lebs != -1) - args.bytes = vol_info.leb_size * args.lebs; + args.bytes = (long long)vol_info.leb_size * args.lebs; err = ubi_rsvol(libubi, args.node, args.vol_id, args.bytes); if (err) { |