diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-12-28 02:58:14 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-12-28 02:58:14 +0000 |
commit | b1d1d36a226d1eb449da0728a90e9aaadcf5a109 (patch) | |
tree | 0b1a4cd0bb1f958cdbe07f9411a01f50bef72e1f /lib/libarchive/archive_util.c | |
parent | cd7df27c58c7c91d2f890a7ed45bb6f9db3ea5ca (diff) | |
download | FreeBSD-src-b1d1d36a226d1eb449da0728a90e9aaadcf5a109.zip FreeBSD-src-b1d1d36a226d1eb449da0728a90e9aaadcf5a109.tar.gz |
New archive_file_count() utility.
Diffstat (limited to 'lib/libarchive/archive_util.c')
-rw-r--r-- | lib/libarchive/archive_util.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/libarchive/archive_util.c b/lib/libarchive/archive_util.c index 1c171b9..4c0de02 100644 --- a/lib/libarchive/archive_util.c +++ b/lib/libarchive/archive_util.c @@ -100,6 +100,11 @@ archive_error_string(struct archive *a) return ("(Empty error message)"); } +int +archive_file_count(struct archive *a) +{ + return (a->file_count); +} int archive_format(struct archive *a) @@ -182,9 +187,14 @@ void __archive_errx(int retvalue, const char *msg) { static const char *msg1 = "Fatal Internal Error in libarchive: "; - write(2, msg1, strlen(msg1)); - write(2, msg, strlen(msg)); - write(2, "\n", 1); + size_t s; + + s = write(2, msg1, strlen(msg1)); + (void)s; /* UNUSED */ + s = write(2, msg, strlen(msg)); + (void)s; /* UNUSED */ + s = write(2, "\n", 1); + (void)s; /* UNUSED */ exit(retvalue); } |