summaryrefslogtreecommitdiffstats
path: root/commands/ubiformat.c
diff options
context:
space:
mode:
authorJan Remmet <j.remmet@phytec.de>2015-09-24 16:28:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-09-29 08:40:42 +0200
commit0c2971a41c89cb2c68cb2b5791af9f291c246432 (patch)
tree6b77740dcca62769e9e35ec49d8e5c276f2ce41f /commands/ubiformat.c
parent4a79ca7d6210d09ad1ebca7a490e06223fc0a17c (diff)
downloadbarebox-0c2971a41c89cb2c68cb2b5791af9f291c246432.tar.gz
barebox-0c2971a41c89cb2c68cb2b5791af9f291c246432.tar.xz
ubiformat: remove dead code
divisor isn't used. Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/ubiformat.c')
-rw-r--r--commands/ubiformat.c7
1 files changed, 2 insertions, 5 deletions
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);