diff options
author | Davidlohr Bueso | 2011-06-09 18:41:12 +0200 |
---|---|---|
committer | Karel Zak | 2011-06-14 16:39:13 +0200 |
commit | 4bc4653e2a3251b8cc253fa022196af59608cf84 (patch) | |
tree | 6cc34d3a252c4281d10ee6e14f56d27d64088236 | |
parent | mkfs.minix: standardize superblock attribute settings (diff) | |
download | kernel-qcow2-util-linux-4bc4653e2a3251b8cc253fa022196af59608cf84.tar.gz kernel-qcow2-util-linux-4bc4653e2a3251b8cc253fa022196af59608cf84.tar.xz kernel-qcow2-util-linux-4bc4653e2a3251b8cc253fa022196af59608cf84.zip |
mkfs.minix: add fs version options
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>
-rw-r--r-- | disk-utils/mkfs.minix.8 | 5 | ||||
-rw-r--r-- | disk-utils/mkfs.minix.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/disk-utils/mkfs.minix.8 b/disk-utils/mkfs.minix.8 index 935910600..add59c878 100644 --- a/disk-utils/mkfs.minix.8 +++ b/disk-utils/mkfs.minix.8 @@ -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 diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c index 213b98fa1..405e241b9 100644 --- a/disk-utils/mkfs.minix.c +++ b/disk-utils/mkfs.minix.c @@ -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; |