]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
debugfs: remove unused htree_dump "-l" argument
authorEric Sandeen <sandeen@redhat.com>
Wed, 11 May 2011 16:46:19 +0000 (11:46 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 15 May 2011 03:37:22 +0000 (23:37 -0400)
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/htree.c

index 08f9749effc8f03557e5b122d2ee0f4ec44e09d5..b829e25ef7ca0d4340974ac7f1137f2cf88144fc 100644 (file)
@@ -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]))