aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_write_set_format_gnutar.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_write_set_format_gnutar.c')
-rw-r--r--libarchive/archive_write_set_format_gnutar.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/libarchive/archive_write_set_format_gnutar.c b/libarchive/archive_write_set_format_gnutar.c
index e7757c22badd..ec29c5c418e4 100644
--- a/libarchive/archive_write_set_format_gnutar.c
+++ b/libarchive/archive_write_set_format_gnutar.c
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_gnu_tar.c 19157
#include "archive_entry_locale.h"
#include "archive_private.h"
#include "archive_write_private.h"
+#include "archive_write_set_format_private.h"
struct gnutar {
uint64_t entry_bytes_remaining;
@@ -534,17 +535,9 @@ archive_write_gnutar_header(struct archive_write *a,
case AE_IFBLK: tartype = '4' ; break;
case AE_IFDIR: tartype = '5' ; break;
case AE_IFIFO: tartype = '6' ; break;
- case AE_IFSOCK:
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "tar format cannot archive socket");
- ret = ARCHIVE_FAILED;
- goto exit_write_header;
- default:
- archive_set_error(&a->archive,
- ARCHIVE_ERRNO_FILE_FORMAT,
- "tar format cannot archive this (mode=0%lo)",
- (unsigned long)archive_entry_mode(entry));
+ default: /* AE_IFSOCK and unknown */
+ __archive_write_entry_filetype_unsupported(
+ &a->archive, entry, "gnutar");
ret = ARCHIVE_FAILED;
goto exit_write_header;
}