summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2004-06-15 00:28:34 +0000
committerkientzle <kientzle@FreeBSD.org>2004-06-15 00:28:34 +0000
commit09f8eaea14da2884333de0e2ce39988d548aa9ce (patch)
treefb44d575b7aae30aaeccda5c0a37f0c63c7ec3a2 /usr.bin/tar
parentca5dd87a5d2cbe7462b3922f81c7b1b4aa2987d9 (diff)
downloadFreeBSD-src-09f8eaea14da2884333de0e2ce39988d548aa9ce.zip
FreeBSD-src-09f8eaea14da2884333de0e2ce39988d548aa9ce.tar.gz
Rename -X to --one-file-system, as GNU tar uses -X for
something else. I would really like a short option for this, but all of the obvious ones conflict with something else.
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/bsdtar.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c
index 01377dc..7794dba 100644
--- a/usr.bin/tar/bsdtar.c
+++ b/usr.bin/tar/bsdtar.c
@@ -75,6 +75,7 @@ const char *tar_opts = "Bb:C:cF:f:HhjkLlmnOoPprtT:UuvwXxyZz";
#define OPTION_NODUMP 3
#define OPTION_HELP 4
#define OPTION_INCLUDE 5
+#define OPTION_ONE_FILE_SYSTEM 5
const struct option tar_longopts[] = {
{ "absolute-paths", no_argument, NULL, 'P' },
@@ -104,6 +105,7 @@ const struct option tar_longopts[] = {
{ "nodump", no_argument, NULL, OPTION_NODUMP },
{ "norecurse", no_argument, NULL, 'n' },
{ "no-same-owner", no_argument, NULL, 'o' },
+ { "one-file-system", no_argument, NULL, OPTION_ONE_FILE_SYSTEM },
{ "preserve-permissions", no_argument, NULL, 'p' },
{ "read-full-blocks", no_argument, NULL, 'B' },
{ "same-permissions", no_argument, NULL, 'p' },
@@ -249,7 +251,7 @@ main(int argc, char **argv)
case 'L': /* BSD convention */
bsdtar->symlink_mode = 'L';
break;
- case 'l': /* SUSv2 */
+ case 'l': /* SUSv2; note that GNU -l conflicts */
bsdtar->option_warn_links = 1;
break;
case 'm': /* SUSv2 */
@@ -266,9 +268,14 @@ main(int argc, char **argv)
case 'O': /* GNU tar */
bsdtar->option_stdout = 1;
break;
- case 'o': /* SUSv2 */
+ case 'o': /* SUSv2; note that GNU -o conflicts */
bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
break;
+#if HAVE_GETOPT_LONG
+ case OPTION_ONE_FILE_SYSTEM: /* -l in GNU tar */
+ bsdtar->option_dont_traverse_mounts = 1;
+ break;
+#endif
#if 0
/*
* The common BSD -P option is not necessary, since
@@ -322,9 +329,6 @@ main(int argc, char **argv)
case 'w': /* SUSv2 */
bsdtar->option_interactive = 1;
break;
- case 'X': /* -l in GNU tar */
- bsdtar->option_dont_traverse_mounts = 1;
- break;
case 'x': /* SUSv2 */
if (mode != '\0')
bsdtar_errc(bsdtar, 1, 0,
OpenPOWER on IntegriCloud