diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2003-05-13 23:03:43 -0400 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2003-05-13 23:03:43 -0400 |
| commit | 88494bb6d440f703db98b6cc4452f63d7aa392b9 (patch) | |
| tree | b8bd05f9f49f29733023629803e245b708c6b140 /debugfs/logdump.c | |
| parent | 62775dc54257c1986a05e33bee25c956c92d783f (diff) | |
| download | android_external_e2fsprogs-88494bb6d440f703db98b6cc4452f63d7aa392b9.tar.gz android_external_e2fsprogs-88494bb6d440f703db98b6cc4452f63d7aa392b9.tar.bz2 android_external_e2fsprogs-88494bb6d440f703db98b6cc4452f63d7aa392b9.zip | |
util.c, ls.c, logdump.c, htree.c, dump.c, debugfs.h, debugfs.c, ChangeLog:
util.c (reset_getopt), debugfs.c (do_open_filesys,
do_show_super_stats), ls.c (do_list_dir), dump.c (do_dump),
htree.c (do_htree_dump, do_dx_hash), logdump.c (do_logdump):
Define and use a new function, reset_getopt(), which does whatever
is necessary to reset getopt() again. This is different for
different implementations, so the portabilty issues are a bit of a
nightmare. (Addresses Debian bug #192834)
Diffstat (limited to 'debugfs/logdump.c')
| -rw-r--r-- | debugfs/logdump.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/debugfs/logdump.c b/debugfs/logdump.c index 1e195ba9..f3f2e5dc 100644 --- a/debugfs/logdump.c +++ b/debugfs/logdump.c @@ -28,9 +28,6 @@ extern int optind; extern char *optarg; #endif -#ifdef HAVE_OPTRESET -extern int optreset; /* defined by BSD, but not others */ -#endif #include "debugfs.h" #include "blkid/blkid.h" @@ -92,10 +89,6 @@ void do_logdump(int argc, char **argv) struct journal_source journal_source; struct ext2_super_block *es = NULL; - optind = 1; -#ifdef HAVE_OPTRESET - optreset = 1; /* Makes BSD getopt happy */ -#endif journal_source.where = 0; journal_source.fd = 0; journal_source.file = 0; @@ -107,6 +100,7 @@ void do_logdump(int argc, char **argv) inode_block_to_dump = -1; inode_to_dump = -1; + reset_getopt(); while ((c = getopt (argc, argv, "ab:ci:f:")) != EOF) { switch (c) { case 'a': |
