]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
chattr.c (main): Add support for '--' to stop options
authorTheodore Ts'o <tytso@mit.edu>
Tue, 20 Jan 2004 18:39:01 +0000 (13:39 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Jan 2004 18:39:01 +0000 (13:39 -0500)
processing.  (Addresses Debian bug #225188).

misc/ChangeLog
misc/chattr.c

index 652f3da5e471fe0ace83dd86187254f7bb135040..e6d60868f190b4316f46ceae551da3232b5bc292 100644 (file)
@@ -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'
index b4b1ca3b4fae623f4f2cbc0f651d6b9c4c3ba20f..bb968646083e145948c7d95e09c59ab0eb560a57 100644 (file)
@@ -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++;