When the output file is an UBI volume - mkfs.ubifs just sets --max-leb-cnt
to the volume size and ignores the user-supplied --max-leb-cnt value, which
is wrong. Let's set it to the volume size only if the user did not supply
--max-leb-cnt.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
if (out_ubi) {
c->min_io_size = c->di.min_io_size;
c->leb_size = c->vi.leb_size;
- c->max_leb_cnt = c->vi.rsvd_lebs;
+ if (c->max_leb_cnt == -1)
+ c->max_leb_cnt = c->vi.rsvd_lebs;
}
if (c->min_io_size == -1)