Whamcloud - gitweb
mke2fs: sort "-d" option alphabetically
authorAndreas Dilger <adilger@dilger.ca>
Mon, 30 Nov 2015 23:30:11 +0000 (18:30 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 30 Nov 2015 23:30:11 +0000 (18:30 -0500)
Move the mke2fs "-d" option to be alphabetical like other options.

Rename "root_dir" to "src_root_dir" to avoid confusion with the
actual root inode in the new filesystem.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.c

index 800a968..dd467f2 100644 (file)
@@ -109,7 +109,7 @@ static char *mount_dir;
 char *journal_device;
 static int sync_kludge;        /* Set using the MKE2FS_SYNC env. option */
 char **fs_types;
-const char *root_dir;  /* Copy files from the specified directory */
+const char *src_root_dir;  /* Copy files from the specified directory */
 static char *undo_file;
 
 static profile_t       profile;
@@ -1547,7 +1547,7 @@ profile_error:
        }
 
        while ((c = getopt (argc, argv,
-                   "b:ce:g:i:jl:m:no:qr:s:t:d:vC:DE:FG:I:J:KL:M:N:O:R:ST:U:Vz:")) != EOF) {
+                   "b:cd:e:g:i:jl:m:no:qr:s:t:vC:DE:FG:I:J:KL:M:N:O:R:ST:U:Vz:")) != EOF) {
                switch (c) {
                case 'b':
                        blocksize = parse_num_blocks2(optarg, -1);
@@ -1580,6 +1580,9 @@ profile_error:
                                exit(1);
                        }
                        break;
+               case 'd':
+                       src_root_dir = optarg;
+                       break;
                case 'D':
                        direct_io = 1;
                        break;
@@ -1759,9 +1762,6 @@ profile_error:
                case 'U':
                        fs_uuid = optarg;
                        break;
-               case 'd':
-                       root_dir = optarg;
-                       break;
                case 'v':
                        verbose = 1;
                        break;
@@ -3106,11 +3106,11 @@ no_journal:
        if (retval)
                com_err(program_name, retval, "while creating huge files");
        /* Copy files from the specified directory */
-       if (root_dir) {
+       if (src_root_dir) {
                if (!quiet)
                        printf("%s", _("Copying files into the device: "));
 
-               retval = populate_fs(fs, EXT2_ROOT_INO, root_dir,
+               retval = populate_fs(fs, EXT2_ROOT_INO, src_root_dir,
                                     EXT2_ROOT_INO);
                if (retval) {
                        com_err(program_name, retval, "%s",