]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
debugfs: fix argument parsing in do_freefrag()
authorArtemiy Volkov <artemiyv@acm.org>
Sat, 2 Aug 2014 23:53:04 +0000 (19:53 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 2 Aug 2014 23:53:04 +0000 (19:53 -0400)
When do_freefrag() is called from debugfs, the value of optind is
not reset. Rectify that by calling reset_getopt().

Signed-off-by: Artemiy Volkov <artemiyv@acm.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/e2freefrag.c

index bb72c70d4606e2c9377af0f18d802d337f42ae4f..90acb7e115539c9b8ec86f87b52f1b1c029bdf20 100644 (file)
@@ -277,6 +277,7 @@ int main(int argc, char *argv[])
 #ifdef DEBUGFS
        if (check_fs_open(argv[0]))
                return;
+       reset_getopt();
 #else
        char *device_name;