summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_write_set_format_by_name.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2004-03-09 19:50:41 +0000
committerkientzle <kientzle@FreeBSD.org>2004-03-09 19:50:41 +0000
commit90072dfae070d180d3c16e0f229fb392b4b910b5 (patch)
treecdb30a1bca796a2ba7a0c712682c923cc981d32c /lib/libarchive/archive_write_set_format_by_name.c
parent63f793ca249823f0c3812457a8342dd6702d0548 (diff)
downloadFreeBSD-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_write_set_format_by_name.c')
-rw-r--r--lib/libarchive/archive_write_set_format_by_name.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libarchive/archive_write_set_format_by_name.c b/lib/libarchive/archive_write_set_format_by_name.c
index e313a98..b67dab5 100644
--- a/lib/libarchive/archive_write_set_format_by_name.c
+++ b/lib/libarchive/archive_write_set_format_by_name.c
@@ -24,9 +24,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
+#include "archive_platform.h"
__FBSDID("$FreeBSD$");
+#include <sys/types.h>
+
+#include <errno.h>
#include <string.h>
#include "archive.h"
@@ -54,6 +57,6 @@ archive_write_set_format_by_name(struct archive *a, const char *name)
return ((names[i].setter)(a));
}
- archive_set_error(a, -1, "No such format '%s'", name);
+ archive_set_error(a, EINVAL, "No such format '%s'", name);
return (ARCHIVE_FATAL);
}
OpenPOWER on IntegriCloud