summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-02-19 05:27:17 +0000
committerkientzle <kientzle@FreeBSD.org>2008-02-19 05:27:17 +0000
commit328399da2fa93270d74c418553c3fc7ba8580628 (patch)
tree587b7fdde370dec40754d050d5221c9ed47d3ab8 /usr.bin/tar
parentce8c4934005fb020ee63b75191b67718d8e42629 (diff)
downloadFreeBSD-src-328399da2fa93270d74c418553c3fc7ba8580628.zip
FreeBSD-src-328399da2fa93270d74c418553c3fc7ba8580628.tar.gz
Allow appending to archives on block devices as well as
archives in regular files, since both are seekable. Thanks to: Reinoud Zandijk (@netbsd.org)
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c
index 0efddd0..c7fb70e 100644
--- a/usr.bin/tar/write.c
+++ b/usr.bin/tar/write.c
@@ -1543,7 +1543,7 @@ test_for_append(struct bsdtar *bsdtar)
if (stat(bsdtar->filename, &s) != 0)
return;
- if (!S_ISREG(s.st_mode))
+ if (!S_ISREG(s.st_mode) && !S_ISBLK(s.st_mode))
bsdtar_errc(bsdtar, 1, 0,
"Cannot append to %s: not a regular file.",
bsdtar->filename);
OpenPOWER on IntegriCloud