Skip to contentSkip to conversation

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

PATCH New Marcus Huewe 1 participant 1 message May 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 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.

---
 misc/mke2fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
misc/mke2fs.c +2 -1
index dd5bb35..e0a98e7 100644
@@ -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
Signature · 1 line
2.6.3