* [PATCH] debugfs: remove unused htree_dump "-l" argument
@ 2011-05-11 16:46 Eric Sandeen
2011-05-12 7:43 ` Lukas Czerner
2011-05-15 3:39 ` Ted Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2011-05-11 16:46 UTC (permalink / raw)
To: ext4 development
The long_opt / -l argument was apparently never implemented,
so remove it and associated argument parsing.
This slightly changes the (undocumented) behavior because it
no longer defaults to cwd if no filespec is specified...
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/debugfs/htree.c b/debugfs/htree.c
index 08f9749..b829e25 100644
--- a/debugfs/htree.c
+++ b/debugfs/htree.c
@@ -197,8 +197,6 @@ void do_htree_dump(int argc, char *argv[])
{
ext2_ino_t ino;
struct ext2_inode inode;
- int c;
- int long_opt = 0;
blk64_t blk;
char *buf = NULL;
struct ext2_dx_root_info *rootnode;
@@ -211,28 +209,7 @@ void do_htree_dump(int argc, char *argv[])
pager = open_pager();
- reset_getopt();
- while ((c = getopt (argc, argv, "l")) != EOF) {
- switch (c) {
- case 'l':
- long_opt++;
- break;
- default:
- goto print_usage;
- }
- }
-
- if (argc > optind+1) {
- print_usage:
- com_err(0, 0, "Usage: htree_dump [-l] file");
- goto errout;
- }
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] debugfs: remove unused htree_dump "-l" argument
2011-05-11 16:46 [PATCH] debugfs: remove unused htree_dump "-l" argument Eric Sandeen
@ 2011-05-12 7:43 ` Lukas Czerner
2011-05-15 3:39 ` Ted Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Lukas Czerner @ 2011-05-12 7:43 UTC (permalink / raw)
To: Eric Sandeen; +Cc: ext4 development
On Wed, 11 May 2011, Eric Sandeen wrote:
> The long_opt / -l argument was apparently never implemented,
> so remove it and associated argument parsing.
>
> This slightly changes the (undocumented) behavior because it
> no longer defaults to cwd if no filespec is specified...
The patch looks good.
Thanks!
-Lukas
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/debugfs/htree.c b/debugfs/htree.c
> index 08f9749..b829e25 100644
> --- a/debugfs/htree.c
> +++ b/debugfs/htree.c
> @@ -197,8 +197,6 @@ void do_htree_dump(int argc, char *argv[])
> {
> ext2_ino_t ino;
> struct ext2_inode inode;
> - int c;
> - int long_opt = 0;
> blk64_t blk;
> char *buf = NULL;
> struct ext2_dx_root_info *rootnode;
> @@ -211,28 +209,7 @@ void do_htree_dump(int argc, char *argv[])
>
> pager = open_pager();
>
> - reset_getopt();
> - while ((c = getopt (argc, argv, "l")) != EOF) {
> - switch (c) {
> - case 'l':
> - long_opt++;
> - break;
> - default:
> - goto print_usage;
> - }
> - }
> -
> - if (argc > optind+1) {
> - print_usage:
> - com_err(0, 0, "Usage: htree_dump [-l] file");
> - goto errout;
> - }
> -
> - if (argc == optind)
> - ino = cwd;
> - else
> - ino = string_to_inode(argv[optind]);
> - if (!ino)
> + if (common_inode_args_process(argc, argv, &ino, 0))
> goto errout;
>
> if (debugfs_read_inode(ino, &inode, argv[1]))
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] debugfs: remove unused htree_dump "-l" argument
2011-05-11 16:46 [PATCH] debugfs: remove unused htree_dump "-l" argument Eric Sandeen
2011-05-12 7:43 ` Lukas Czerner
@ 2011-05-15 3:39 ` Ted Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2011-05-15 3:39 UTC (permalink / raw)
To: Eric Sandeen; +Cc: ext4 development
On Wed, May 11, 2011 at 11:46:19AM -0500, Eric Sandeen wrote:
> The long_opt / -l argument was apparently never implemented,
> so remove it and associated argument parsing.
>
> This slightly changes the (undocumented) behavior because it
> no longer defaults to cwd if no filespec is specified...
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Thanks, added to the e2fsprogs "next" branch.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-15 3:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 16:46 [PATCH] debugfs: remove unused htree_dump "-l" argument Eric Sandeen
2011-05-12 7:43 ` Lukas Czerner
2011-05-15 3:39 ` Ted Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).