diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-03-09 19:50:41 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-03-09 19:50:41 +0000 |
commit | 90072dfae070d180d3c16e0f229fb392b4b910b5 (patch) | |
tree | cdb30a1bca796a2ba7a0c712682c923cc981d32c /lib/libarchive/archive_read.c | |
parent | 63f793ca249823f0c3812457a8342dd6702d0548 (diff) | |
download | FreeBSD-src-90072dfae070d180d3c16e0f229fb392b4b910b5.zip FreeBSD-src-90072dfae070d180d3c16e0f229fb392b4b910b5.tar.gz |
Many fixes.
Portability: Thanks to Juergen Lock, libarchive now compiles cleanly
on Linux. Along the way, I cleaned up a lot of error return codes and
reorganized some code to simplify conditional compilation of certain
sections.
Bug fixes:
* pax format now actually stores filenames that are 101-154
characters long.
* pax format now allows newline characters in extended attributes
(this fixes a long-standing bug in ACL handling)
* mtime/atime are now restored for directories
* directory list is now sorted prior to fix-up to permit
correct restore of non-writable dir heirarchies
Diffstat (limited to 'lib/libarchive/archive_read.c')
-rw-r--r-- | lib/libarchive/archive_read.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libarchive/archive_read.c b/lib/libarchive/archive_read.c index 1c24d2d..e51ea02 100644 --- a/lib/libarchive/archive_read.c +++ b/lib/libarchive/archive_read.c @@ -32,10 +32,10 @@ * needlessly bloating statically-linked clients. */ -#include <sys/cdefs.h> +#include "archive_platform.h" __FBSDID("$FreeBSD$"); -#ifdef DMALLOC +#ifdef HAVE_DMALLOC #include <dmalloc.h> #endif #include <err.h> @@ -183,8 +183,8 @@ choose_decompressor(struct archive *a, const void *buffer, size_t bytes_read) * support this stream. */ if (best_bid < 1) { - archive_set_error(a, EFTYPE, "Unrecognized archive format"); - /* EFTYPE == "Inappropriate file type or format" */ + archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, + "Unrecognized archive format"); return (ARCHIVE_FATAL); } @@ -303,7 +303,8 @@ choose_format(struct archive *a) * can't support this stream. */ if (best_bid < 1) { - archive_set_error(a, EFTYPE, "Unrecognized archive format"); + archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, + "Unrecognized archive format"); return (ARCHIVE_FATAL); } @@ -374,7 +375,7 @@ archive_read_data_skip(struct archive *a) return (ARCHIVE_FATAL); } if (bytes_read == 0) { - archive_set_error(a, 0, + archive_set_error(a, EIO, "Premature end of archive entry"); return (ARCHIVE_FATAL); } |