]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Merge pull request #1632 from wlozano0collabora/default-archive-file
authorTim Kientzle <kientzle@acm.org>
Sat, 4 Dec 2021 18:56:33 +0000 (10:56 -0800)
committerGitHub <noreply@github.com>
Sat, 4 Dec 2021 18:56:33 +0000 (10:56 -0800)
Have `bsdtar` default to stdout if this system has no tape device.  This uses an `access()` check to see if the default tape device (e.g., `/dev/tape` on FreeBSD) exists and will use stdout as the default if it doesn't exist.  If the system does have a tape device, there is no change to the existing behavior.

For libarchive 4.0, we'll change the default behavior of `bsdtar`:
* The `TAPE` environment variable will still be honored at runtime
* The `_PATH_DEFTAPE` preprocessor macro will still be honored at build time
* But `_PATH_DEFTAPE` will no longer be set by libarchive's default build, with the effect that for most people, bsdtar will default to stdout if there is no `-f` option provided.

1  2 
tar/bsdtar.c

diff --cc tar/bsdtar.c
Simple merge