diff --git a/common/ubiformat.c b/common/ubiformat.c index 9fe1c7c..0811525 100644 --- a/common/ubiformat.c +++ b/common/ubiformat.c @@ -235,6 +235,9 @@ int err, new_len; long long ec; + if (si->ec[eb] == EB_BAD) + continue; + if (!args->quiet && !args->verbose) { if (is_timeout(lastprint, 300 * MSECOND) || eb == eb_cnt - 1) { @@ -244,9 +247,6 @@ } } - if (si->ec[eb] == EB_BAD) - continue; - if (args->verbose) { normsg_cont("eraseblock %d: erase", eb); } @@ -357,6 +357,9 @@ for (eb = start_eb; eb < eb_cnt; eb++) { long long ec; + if (si->ec[eb] == EB_BAD) + continue; + if (!args->quiet && !args->verbose) { if (is_timeout(lastprint, 300 * MSECOND) || eb == eb_cnt - 1) { @@ -366,9 +369,6 @@ } } - if (si->ec[eb] == EB_BAD) - continue; - if (args->override_ec) ec = args->ec; else if (si->ec[eb] <= EC_MAX)