diff options
author | Theodore Ts'o <tytso@mit.edu> | 2004-01-20 13:39:01 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2004-01-20 13:39:01 -0500 |
commit | 2293a4d5deb30b02d90c4d0aee516e8280092a58 (patch) | |
tree | ef16c084c57cdb77cb646ffd4f96c5cbc6c35858 | |
parent | b34cbddbd66baedc163d36dd281b63ef478f547a (diff) | |
download | e2fsprogs-2293a4d5deb30b02d90c4d0aee516e8280092a58.tar.gz |
chattr.c (main): Add support for '--' to stop options
processing. (Addresses Debian bug #225188).
-rw-r--r-- | misc/ChangeLog | 5 | ||||
-rw-r--r-- | misc/chattr.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog index 652f3da5..e6d60868 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2004-01-20 root <tytso@mit.edu> + + * chattr.c (main): Add support for '--' to stop options + processing. (Addresses Debian bug #225188). + 2003-12-26 Theodore Ts'o <tytso@mit.edu> * chattr.1.in: Update text indicating the 'c', 's', and 'u' diff --git a/misc/chattr.c b/misc/chattr.c index b4b1ca3b..bb968646 100644 --- a/misc/chattr.c +++ b/misc/chattr.c @@ -276,7 +276,11 @@ int main (int argc, char ** argv) program_name = *argv; i = 1; while (i < argc && !end_arg) { - if (decode_arg (&i, argc, argv) == EOF) + /* '--' arg should end option processing */ + if (strcmp(argv[i], "--") == 0) { + i++; + end_arg = 1; + } else if (decode_arg (&i, argc, argv) == EOF) end_arg = 1; else i++; |