diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/pax/extern.h | 3 | ||||
-rw-r--r-- | bin/pax/options.c | 6 | ||||
-rw-r--r-- | bin/pax/tar.c | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/bin/pax/extern.h b/bin/pax/extern.h index a90d7414122..3ceb90eef40 100644 --- a/bin/pax/extern.h +++ b/bin/pax/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.50 2015/03/09 04:23:29 guenther Exp $ */ +/* $OpenBSD: extern.h,v 1.51 2015/03/15 19:47:27 guenther Exp $ */ /* $NetBSD: extern.h,v 1.5 1996/03/26 23:54:16 mrg Exp $ */ /*- @@ -293,6 +293,7 @@ u_int st_hash(const char *, int, int); /* * tar.c */ +extern int tar_nodir; extern char *gnu_name_string, *gnu_link_string; int tar_endwr(void); off_t tar_endrd(void); diff --git a/bin/pax/options.c b/bin/pax/options.c index 664232f19fc..da10851c3fe 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.87 2015/03/12 04:15:03 guenther Exp $ */ +/* $OpenBSD: options.c,v 1.88 2015/03/15 19:47:27 guenther Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -722,6 +722,7 @@ tar_options(int argc, char **argv) break; case 'o': Oflag = 2; + tar_nodir = 1; break; case 'p': /* @@ -956,9 +957,6 @@ tar_options(int argc, char **argv) case APPND: frmt = &(fsub[Oflag ? F_OTAR : F_TAR]); - if (Oflag == 2 && opt_add("write_opt=nodir") < 0) - tar_usage(); - if (chdname != NULL) { /* initial chdir() */ if (ftree_add(chdname, 1) < 0) tar_usage(); diff --git a/bin/pax/tar.c b/bin/pax/tar.c index 2a483c8c3a0..7878e2593e7 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.c,v 1.56 2015/03/09 04:23:29 guenther Exp $ */ +/* $OpenBSD: tar.c,v 1.57 2015/03/15 19:47:27 guenther Exp $ */ /* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */ /*- @@ -70,7 +70,7 @@ static gid_t gid_warn; * Routines common to all versions of tar */ -static int tar_nodir; /* do not write dirs under old tar */ +int tar_nodir; /* do not write dirs under old tar */ char *gnu_name_string; /* GNU ././@LongLink hackery name */ char *gnu_link_string; /* GNU ././@LongLink hackery link */ |