mke2fs: fix filesystem size calculation, if an offset is specified

If a filesystem size is explicitly specified, it should be used without
subtracting the offset.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debian
Marcus Huewe 2016-05-12 15:25:14 -04:00 committed by Theodore Ts'o
parent 093d9b4006
commit dc01088db5
1 changed files with 2 additions and 1 deletions

View File

@ -1874,6 +1874,8 @@ profile_error:
flags |= VERBOSE_CREATE;
if (fs_blocks_count == 0)
flags |= NO_SIZE;
else
explicit_fssize = 1;
if (!check_plausibility(device_name, flags, &is_device) && !force)
proceed_question(proceed_delay);
@ -1881,7 +1883,6 @@ profile_error:
/* Determine the size of the device (if possible) */
if (noaction && fs_blocks_count) {
explicit_fssize = 1;
dev_size = fs_blocks_count;
retval = 0;
} else