diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-10-07 08:23:45 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-10-07 08:23:45 +0200 |
commit | c8fa7eed6695fb261cdeba49136ac8611e409952 (patch) | |
tree | 43aa2bc1ee12777cb4937ed3a70cad4e12ce3d92 /commands | |
parent | 7bf2e891a4909f1cd4c765761b05984b5ff962bb (diff) | |
parent | 1c9e671462ad4f4e294e962417e122da2a762e65 (diff) | |
download | barebox-c8fa7eed6695fb261cdeba49136ac8611e409952.tar.gz barebox-c8fa7eed6695fb261cdeba49136ac8611e409952.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'commands')
-rw-r--r-- | commands/ls.c | 2 | ||||
-rw-r--r-- | commands/ubiformat.c | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/commands/ls.c b/commands/ls.c index 1a5925d427..09437afcdf 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -32,7 +32,7 @@ static void ls_one(const char *path, const char* fullname, struct stat *s) unsigned int namelen = strlen(path); mkmodestr(s->st_mode, modestr); - printf("%s %10llu %*.*s", modestr, s->st_size, namelen, namelen, path); + printf("%s %14llu %*.*s", modestr, s->st_size, namelen, namelen, path); if (S_ISLNK(s->st_mode)) { char realname[PATH_MAX]; diff --git a/commands/ubiformat.c b/commands/ubiformat.c index f9d952cff0..8516e112c3 100644 --- a/commands/ubiformat.c +++ b/commands/ubiformat.c @@ -297,7 +297,7 @@ static int mark_bad(const struct mtd_dev_info *mtd, struct ubi_scan_info *si, in static int flash_image(const struct mtd_dev_info *mtd, const struct ubigen_info *ui, struct ubi_scan_info *si) { - int fd, img_ebs, eb, written_ebs = 0, divisor, ret = -1; + int fd, img_ebs, eb, written_ebs = 0, ret = -1; off_t st_size; char *buf = NULL; @@ -332,7 +332,6 @@ static int flash_image(const struct mtd_dev_info *mtd, } verbose(args.verbose, "will write %d eraseblocks", img_ebs); - divisor = img_ebs; for (eb = 0; eb < mtd->eb_cnt; eb++) { int err, new_len; long long ec; @@ -342,10 +341,8 @@ static int flash_image(const struct mtd_dev_info *mtd, eb, (eb + 1) * 100 / mtd->eb_cnt); } - if (si->ec[eb] == EB_BAD) { - divisor += 1; + if (si->ec[eb] == EB_BAD) continue; - } if (args.verbose) { normsg_cont("eraseblock %d: erase", eb); |