summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authornaddy <naddy@openbsd.org>2019-11-15 20:34:17 +0000
committernaddy <naddy@openbsd.org>2019-11-15 20:34:17 +0000
commit55d472e4679adc5b1ab8e062b0abfdbe07012930 (patch)
tree69a34cdb85d8e338669be632a35ef2e920e4b9c8 /bin
parentnicer order of multi-choice packages (by version if everything else is (diff)
downloadwireguard-openbsd-55d472e4679adc5b1ab8e062b0abfdbe07012930.tar.xz
wireguard-openbsd-55d472e4679adc5b1ab8e062b0abfdbe07012930.zip
In cpio mode, when processing the -o switch, only set the archive format
if not already set. This makes "cpio -Hustar -o" behave the same as "cpio -o -Hustar". ok guenther@
Diffstat (limited to 'bin')
-rw-r--r--bin/pax/options.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/pax/options.c b/bin/pax/options.c
index 5db0948858c..5570873de15 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.102 2018/09/13 12:33:43 millert Exp $ */
+/* $OpenBSD: options.c,v 1.103 2019/11/15 20:34:17 naddy Exp $ */
/* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */
/*-
@@ -1226,7 +1226,8 @@ cpio_options(int argc, char **argv)
* create an archive
*/
act = ARCHIVE;
- frmt = &(fsub[F_CPIO]);
+ if (frmt == NULL)
+ frmt = &(fsub[F_CPIO]);
break;
case 'p':
/*