From 328399da2fa93270d74c418553c3fc7ba8580628 Mon Sep 17 00:00:00 2001 From: kientzle Date: Tue, 19 Feb 2008 05:27:17 +0000 Subject: Allow appending to archives on block devices as well as archives in regular files, since both are seekable. Thanks to: Reinoud Zandijk (@netbsd.org) --- usr.bin/tar/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin') 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); -- cgit v1.1