Add in (and ignore) tar -p, since we preserver permissions automatically.
authorEric Andersen <andersen@codepoet.org>
Thu, 21 Jun 2001 15:17:59 +0000 (15:17 -0000)
committerEric Andersen <andersen@codepoet.org>
Thu, 21 Jun 2001 15:17:59 +0000 (15:17 -0000)
closes bug #1185
 -Erik

archival/tar.c
tar.c

index bca5a090625fe818666713ec80830584b676e6a5..8dec4349d3f4a94892029b033856a6f2f540e03a 100644 (file)
@@ -181,9 +181,9 @@ extern int tar_main(int argc, char **argv)
 
        while (
 #ifndef BB_FEATURE_TAR_EXCLUDE
-                       (opt = getopt(argc, argv, "cxtzvOf:"))
+                       (opt = getopt(argc, argv, "cxtzvOf:p"))
 #else
-                       (opt = getopt_long(argc, argv, "cxtzvOf:X:", longopts, NULL))
+                       (opt = getopt_long(argc, argv, "cxtzvOf:X:p", longopts, NULL))
 #endif
                        > 0) {
                switch (opt) {
@@ -238,7 +238,9 @@ extern int tar_main(int argc, char **argv)
                                fclose(fileList);
                                break;
 #endif
-                               default:
+                       case 'p':
+                               break;
+                       default:
                                        show_usage();
                }
        }
diff --git a/tar.c b/tar.c
index bca5a090625fe818666713ec80830584b676e6a5..8dec4349d3f4a94892029b033856a6f2f540e03a 100644 (file)
--- a/tar.c
+++ b/tar.c
@@ -181,9 +181,9 @@ extern int tar_main(int argc, char **argv)
 
        while (
 #ifndef BB_FEATURE_TAR_EXCLUDE
-                       (opt = getopt(argc, argv, "cxtzvOf:"))
+                       (opt = getopt(argc, argv, "cxtzvOf:p"))
 #else
-                       (opt = getopt_long(argc, argv, "cxtzvOf:X:", longopts, NULL))
+                       (opt = getopt_long(argc, argv, "cxtzvOf:X:p", longopts, NULL))
 #endif
                        > 0) {
                switch (opt) {
@@ -238,7 +238,9 @@ extern int tar_main(int argc, char **argv)
                                fclose(fileList);
                                break;
 #endif
-                               default:
+                       case 'p':
+                               break;
+                       default:
                                        show_usage();
                }
        }