]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkfs.minix: add fs version options
authorDavidlohr Bueso <dave@gnu.org>
Thu, 9 Jun 2011 16:41:12 +0000 (12:41 -0400)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jun 2011 14:39:13 +0000 (16:39 +0200)
Like the original minix mkfs, add the -1 and -2 argument options to specify the
version of the filesystem to create.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
disk-utils/mkfs.minix.8
disk-utils/mkfs.minix.c

index 93591060020beb2c21d13c8fac3a929cbe334253..add59c878d248b9eac28aed9a04ad749e2469719 100644 (file)
@@ -59,7 +59,10 @@ Read the bad blocks list from
 The file has one bad block number per line.  The count of bad blocks read
 is printed.
 .TP
-.B \-v
+.B \-1
+Make a Minix version 1 filesystem.
+.TP
+.B  \-2,\-v
 Make a Minix version 2 filesystem.
 .SH "EXIT CODES"
 The exit code returned by
index 213b98fa12a0a9f041d6f931e194361c78edc162..405e241b9219a6ac23ea2bcfe2be9ec2bec51f39 100644 (file)
@@ -586,7 +586,7 @@ int main(int argc, char ** argv) {
                errx(MKFS_ERROR, _("%s: bad inode size"), device_name);
 
        opterr = 0;
-       while ((i = getopt(argc, argv, "ci:l:n:v")) != -1)
+       while ((i = getopt(argc, argv, "ci:l:n:v12")) != -1)
                switch (i) {
                case 'c':
                        check=1; break;
@@ -608,7 +608,11 @@ int main(int argc, char ** argv) {
                        namelen = i;
                        dirsize = i+2;
                        break;
-               case 'v':
+               case '1':
+                       fs_version = 1;
+                       break;
+               case '2':
+               case 'v': /* kept for backwards compatiblitly */
                        fs_version = 2;
                        version2 = 1;
                        break;