* [PATCH] mke2fs: sort "-d" option alphabetically
@ 2015-11-24 22:16 Andreas Dilger
2015-11-24 22:17 ` Andreas Dilger
2015-11-30 23:31 ` Theodore Ts'o
0 siblings, 2 replies; 4+ messages in thread
From: Andreas Dilger @ 2015-11-24 22:16 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4, Andreas Dilger
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>
---
misc/mke2fs.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 179a4d1..9aaafbc 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -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;
@@ -1552,7 +1552,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);
@@ -1585,6 +1585,9 @@ profile_error:
exit(1);
}
break;
+ case 'd':
+ src_root_dir = optarg;
+ break;
case 'D':
direct_io = 1;
break;
@@ -1765,9 +1768,6 @@ profile_error:
case 'U':
fs_uuid = optarg;
break;
- case 'd':
- root_dir = optarg;
- break;
case 'v':
verbose = 1;
break;
@@ -3143,11 +3143,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",
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mke2fs: sort "-d" option alphabetically
2015-11-24 22:16 [PATCH] mke2fs: sort "-d" option alphabetically Andreas Dilger
@ 2015-11-24 22:17 ` Andreas Dilger
2015-11-30 23:31 ` Theodore Ts'o
1 sibling, 0 replies; 4+ messages in thread
From: Andreas Dilger @ 2015-11-24 22:17 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4
[-- Attachment #1: Type: text/plain, Size: 2344 bytes --]
On Nov 24, 2015, at 3:16 PM, Andreas Dilger <adilger@dilger.ca> wrote:
>
> 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.
This patch is against master, since "-d" only lives there today, but I
noticed it while working on the extent/htree corruption test case.
Cheers, Andreas
> Signed-off-by: Andreas Dilger <adilger@dilger.ca>
> ---
> misc/mke2fs.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/misc/mke2fs.c b/misc/mke2fs.c
> index 179a4d1..9aaafbc 100644
> --- a/misc/mke2fs.c
> +++ b/misc/mke2fs.c
> @@ -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;
> @@ -1552,7 +1552,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);
> @@ -1585,6 +1585,9 @@ profile_error:
> exit(1);
> }
> break;
> + case 'd':
> + src_root_dir = optarg;
> + break;
> case 'D':
> direct_io = 1;
> break;
> @@ -1765,9 +1768,6 @@ profile_error:
> case 'U':
> fs_uuid = optarg;
> break;
> - case 'd':
> - root_dir = optarg;
> - break;
> case 'v':
> verbose = 1;
> break;
> @@ -3143,11 +3143,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",
> --
> 1.7.3.4
>
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mke2fs: sort "-d" option alphabetically
2015-11-24 22:16 [PATCH] mke2fs: sort "-d" option alphabetically Andreas Dilger
2015-11-24 22:17 ` Andreas Dilger
@ 2015-11-30 23:31 ` Theodore Ts'o
1 sibling, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2015-11-30 23:31 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-ext4
On Tue, Nov 24, 2015 at 03:16:46PM -0700, Andreas Dilger wrote:
> 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>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mke2fs: sort "-d" option alphabetically
@ 2015-11-19 4:53 Andreas Dilger
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Dilger @ 2015-11-19 4:53 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4, Andreas Dilger
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>
---
misc/mke2fs.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 179a4d1..9aaafbc 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -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;
@@ -1552,7 +1552,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);
@@ -1585,6 +1585,9 @@ profile_error:
exit(1);
}
break;
+ case 'd':
+ src_root_dir = optarg;
+ break;
case 'D':
direct_io = 1;
break;
@@ -1765,9 +1768,6 @@ profile_error:
case 'U':
fs_uuid = optarg;
break;
- case 'd':
- root_dir = optarg;
- break;
case 'v':
verbose = 1;
break;
@@ -3143,11 +3143,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",
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-30 23:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-24 22:16 [PATCH] mke2fs: sort "-d" option alphabetically Andreas Dilger
2015-11-24 22:17 ` Andreas Dilger
2015-11-30 23:31 ` Theodore Ts'o
-- strict thread matches above, loose matches on Subject: below --
2015-11-19 4:53 Andreas Dilger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.