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 /misc/chattr.c | |
parent | b34cbddbd66baedc163d36dd281b63ef478f547a (diff) | |
download | e2fsprogs-2293a4d5deb30b02d90c4d0aee516e8280092a58.tar.gz |
chattr.c (main): Add support for '--' to stop options
processing. (Addresses Debian bug #225188).
Diffstat (limited to 'misc/chattr.c')
-rw-r--r-- | misc/chattr.c | 6 |
1 files changed, 5 insertions, 1 deletions
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++; |