summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-04-27 18:35:03 +0000
committerkientzle <kientzle@FreeBSD.org>2009-04-27 18:35:03 +0000
commit1b3570dae153192dd32083ea6b7542499b0cf877 (patch)
tree7075014f6c5f1c997cd71a600bf77183cf3732e8 /lib
parent379ce7aa2e2c48704092f20f5158e4943c2ef373 (diff)
downloadFreeBSD-src-1b3570dae153192dd32083ea6b7542499b0cf877.zip
FreeBSD-src-1b3570dae153192dd32083ea6b7542499b0cf877.tar.gz
Merge r1021 from libarchive.googlecode.com:
If we know it's a socket, say so.
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/archive_write_set_format_pax.c8
-rw-r--r--lib/libarchive/archive_write_set_format_ustar.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/libarchive/archive_write_set_format_pax.c b/lib/libarchive/archive_write_set_format_pax.c
index 6ea8f5e..e768a7d 100644
--- a/lib/libarchive/archive_write_set_format_pax.c
+++ b/lib/libarchive/archive_write_set_format_pax.c
@@ -452,8 +452,14 @@ archive_write_pax_header(struct archive_write *a,
free(t);
}
break;
+ case AE_IFSOCK:
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "tar format cannot archive socket");
+ return (ARCHIVE_WARN);
default:
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
"tar format cannot archive this (type=0%lo)",
(unsigned long)archive_entry_filetype(entry_original));
return (ARCHIVE_WARN);
diff --git a/lib/libarchive/archive_write_set_format_ustar.c b/lib/libarchive/archive_write_set_format_ustar.c
index ad7e842..2de0cf1 100644
--- a/lib/libarchive/archive_write_set_format_ustar.c
+++ b/lib/libarchive/archive_write_set_format_ustar.c
@@ -414,8 +414,14 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
case AE_IFBLK: h[USTAR_typeflag_offset] = '4' ; break;
case AE_IFDIR: h[USTAR_typeflag_offset] = '5' ; break;
case AE_IFIFO: h[USTAR_typeflag_offset] = '6' ; break;
+ case AE_IFSOCK:
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "tar format cannot archive socket");
+ return (ARCHIVE_FAILED);
default:
- archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
"tar format cannot archive this (mode=0%lo)",
(unsigned long)archive_entry_mode(entry));
ret = ARCHIVE_FAILED;
OpenPOWER on IntegriCloud