diff options
author | 1996-08-10 03:08:00 +0000 | |
---|---|---|
committer | 1996-08-10 03:08:00 +0000 | |
commit | c2e82e9eb14d4b073b8af3862a04524411e17c59 (patch) | |
tree | 7f04c2f354d861601acabbc0107d476ab11b36a3 | |
parent | from compat_linux; apparently hacked by soda@sra.co.jp (diff) | |
download | wireguard-openbsd-c2e82e9eb14d4b073b8af3862a04524411e17c59.tar.xz wireguard-openbsd-c2e82e9eb14d4b073b8af3862a04524411e17c59.zip |
Add support for -h in tar emulation mode to follow symlinks
-rw-r--r-- | bin/pax/options.c | 12 | ||||
-rw-r--r-- | bin/pax/tar.1 | 7 |
2 files changed, 14 insertions, 5 deletions
diff --git a/bin/pax/options.c b/bin/pax/options.c index 05cdb90a544..e62b2c29718 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.7 1996/08/02 12:41:01 deraadt Exp $ */ +/* $OpenBSD: options.c,v 1.8 1996/08/10 03:08:00 tholo Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.7 1996/08/02 12:41:01 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.8 1996/08/10 03:08:00 tholo Exp $"; #endif #endif /* not lint */ @@ -603,7 +603,7 @@ tar_options(argc, argv) /* * process option flags */ - while ((c = getoldopt(argc, argv, "b:cef:moprutvwxzBHLPXZ014578")) + while ((c = getoldopt(argc, argv, "b:cef:hmoprutvwxzBHLPXZ014578")) != EOF) { switch(c) { case 'b': @@ -642,6 +642,12 @@ tar_options(argc, argv) fstdin = 0; arcname = optarg; break; + case 'h': + /* + * follow symlinks + */ + Lflag = 1; + break; case 'm': /* * do not preserve modification time diff --git a/bin/pax/tar.1 b/bin/pax/tar.1 index a492224f42d..78037f2a484 100644 --- a/bin/pax/tar.1 +++ b/bin/pax/tar.1 @@ -27,7 +27,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: tar.1,v 1.1 1996/06/11 18:07:13 tholo Exp $ +.\" $OpenBSD: tar.1,v 1.2 1996/08/10 03:08:00 tholo Exp $ .\" .Dd June 11, 1996 .Dt TAR 1 @@ -37,7 +37,7 @@ .Nd tape archiver .Sh SYNOPSIS .Nm tar -.No [-]{crtux}[befmopvwzHLPXZ014578] +.No [-]{crtux}[befhmopvwzHLPXZ014578] .Op Ar archive .Op Ar blocksize .Ar file1 @@ -84,6 +84,9 @@ Stop after first error. .It Fl f Ar archive Filename where the archive is stored. Defaults to .Pa /dev/rmt8 +.It Fl h +Follow symbolic links as if they were normal files +or directories. .It Fl m Do not preserve modification time. .It Fl o |