From: Artemiy Volkov Date: Sat, 2 Aug 2014 23:53:04 +0000 (-0400) Subject: debugfs: fix argument parsing in do_freefrag() X-Git-Tag: v1.42.12~40 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=bf140bf29866991a3711688a5182fc5b1ae7c7cd;p=tools%2Fe2fsprogs.git debugfs: fix argument parsing in do_freefrag() 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 Signed-off-by: Theodore Ts'o --- diff --git a/misc/e2freefrag.c b/misc/e2freefrag.c index bb72c70..90acb7e 100644 --- a/misc/e2freefrag.c +++ b/misc/e2freefrag.c @@ -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;