aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/mkfs_ext2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c
index 44fb40250..cf40c20eb 100644
--- a/util-linux/mkfs_ext2.c
+++ b/util-linux/mkfs_ext2.c
@@ -217,7 +217,7 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv)
217 &reserved_percent, NULL, NULL, &label, NULL, NULL, NULL, NULL, NULL, NULL); 217 &reserved_percent, NULL, NULL, &label, NULL, NULL, NULL, NULL, NULL, NULL);
218 argv += optind; // argv[0] -- device 218 argv += optind; // argv[0] -- device
219 219
220 // check the device is a block device 220 // open the device, check the device is a block device
221 xmove_fd(xopen(argv[0], O_WRONLY), fd); 221 xmove_fd(xopen(argv[0], O_WRONLY), fd);
222 fstat(fd, &st); 222 fstat(fd, &st);
223 if (!S_ISBLK(st.st_mode) && !(option_mask32 & OPT_F)) 223 if (!S_ISBLK(st.st_mode) && !(option_mask32 & OPT_F))
@@ -225,11 +225,11 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv)
225 225
226 // check if it is mounted 226 // check if it is mounted
227 // N.B. what if we format a file? find_mount_point will return false negative since 227 // N.B. what if we format a file? find_mount_point will return false negative since
228 // it is loop block device which mounted! 228 // it is loop block device which is mounted!
229 if (find_mount_point(argv[0], 0)) 229 if (find_mount_point(argv[0], 0))
230 bb_error_msg_and_die("can't format mounted filesystem"); 230 bb_error_msg_and_die("can't format mounted filesystem");
231 231
232 // open the device, get size in kbytes 232 // get size in kbytes
233 kilobytes = get_volume_size_in_bytes(fd, argv[1], 1024, /*extend:*/ !(option_mask32 & OPT_n)) / 1024; 233 kilobytes = get_volume_size_in_bytes(fd, argv[1], 1024, /*extend:*/ !(option_mask32 & OPT_n)) / 1024;
234 234
235 bytes_per_inode = 16384; 235 bytes_per_inode = 16384;