summaryrefslogtreecommitdiff
path: root/util-linux/mkfs_ext2.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/mkfs_ext2.c')
-rw-r--r--util-linux/mkfs_ext2.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c
index fd54734fc..14feb9288 100644
--- a/util-linux/mkfs_ext2.c
+++ b/util-linux/mkfs_ext2.c
@@ -140,7 +140,7 @@ static void PUT(uint64_t off, void *buf, uint32_t size)
140// only for directories, which never need i_size_high). 140// only for directories, which never need i_size_high).
141// 141//
142// Standard mke2fs creates a filesystem with 256-byte inodes if it is 142// Standard mke2fs creates a filesystem with 256-byte inodes if it is
143// bigger than 0.5GB. So far, we do not do this. 143// bigger than 0.5GB.
144 144
145// Standard mke2fs 1.41.9: 145// Standard mke2fs 1.41.9:
146// Usage: mke2fs [-c|-l filename] [-b block-size] [-f fragment-size] 146// Usage: mke2fs [-c|-l filename] [-b block-size] [-f fragment-size]
@@ -210,17 +210,20 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv)
210 210
211 // using global "option_mask32" instead of local "opts": 211 // using global "option_mask32" instead of local "opts":
212 // we are register starved here 212 // we are register starved here
213 opt_complementary = "-1:b+:m+:i+"; 213 opt_complementary = "-1:b+:i+:I+:m+";
214 /*opts =*/ getopt32(argv, "cl:b:f:i:I:J:G:N:m:o:g:L:M:O:r:E:T:U:jnqvFS", 214 /*opts =*/ getopt32(argv, "cl:b:f:i:I:J:G:N:m:o:g:L:M:O:r:E:T:U:jnqvFS",
215 NULL, &bs, NULL, &bpi, &user_inodesize, NULL, NULL, NULL, 215 /*lbfi:*/ NULL, &bs, NULL, &bpi,
216 &reserved_percent, NULL, NULL, &label, NULL, NULL, NULL, NULL, NULL, NULL); 216 /*IJGN:*/ &user_inodesize, NULL, NULL, NULL,
217 /*mogL:*/ &reserved_percent, NULL, NULL, &label,
218 /*MOrE:*/ NULL, NULL, NULL, NULL,
219 /*TU:*/ NULL, NULL);
217 argv += optind; // argv[0] -- device 220 argv += optind; // argv[0] -- device
218 221
219 // open the device, check the device is a block device 222 // open the device, check the device is a block device
220 xmove_fd(xopen(argv[0], O_WRONLY), fd); 223 xmove_fd(xopen(argv[0], O_WRONLY), fd);
221 fstat(fd, &st); 224 fstat(fd, &st);
222 if (!S_ISBLK(st.st_mode) && !(option_mask32 & OPT_F)) 225 if (!S_ISBLK(st.st_mode) && !(option_mask32 & OPT_F))
223 bb_error_msg_and_die("not a block device"); 226 bb_error_msg_and_die("%s: not a block device", argv[0]);
224 227
225 // check if it is mounted 228 // check if it is mounted
226 // N.B. what if we format a file? find_mount_point will return false negative since 229 // N.B. what if we format a file? find_mount_point will return false negative since