processing. (Addresses Debian bug #225188).
+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'
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++;