summaryrefslogtreecommitdiff
path: root/libarchive/archive_write_add_filter_lrzip.c
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-10-07 16:13:17 +0900
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-10-07 16:13:17 +0900
commit1d6fea42fa084eda2677610bac360ede509d5305 (patch)
treeee830a3d2c1c07eebd94c84eafde8694237676b9 /libarchive/archive_write_add_filter_lrzip.c
parent5dd4141b1ee3715b46882da2322581f5f74f958f (diff)
downloadlibarchive-1d6fea42fa084eda2677610bac360ede509d5305.tar.gz
archive_read_support_filter_lrzip and archive_write_add_filter_lrzip
should return ARCHIVE_WARN instead of ARCHIVE_OK since those filters always use an external program, lrzip(1) and other filters do so if they use an external program instead of implemented code with the library. It is clear that returning ARCHIVE_WARN means the filter uses an external program.
Diffstat (limited to 'libarchive/archive_write_add_filter_lrzip.c')
-rw-r--r--libarchive/archive_write_add_filter_lrzip.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/libarchive/archive_write_add_filter_lrzip.c b/libarchive/archive_write_add_filter_lrzip.c
index 5602c870..4e2fa8aa 100644
--- a/libarchive/archive_write_add_filter_lrzip.c
+++ b/libarchive/archive_write_add_filter_lrzip.c
@@ -27,25 +27,16 @@
__FBSDID("$FreeBSD$");
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#include <time.h>
-
#include "archive.h"
-#include "archive_private.h"
-#include "archive_write_private.h"
-
int
archive_write_add_filter_lrzip(struct archive *a)
{
- return archive_write_add_filter_programl(a, "lrzip", "lrzip",
+ int r;
+ r = archive_write_add_filter_programl(a, "lrzip", "lrzip",
"-q", NULL);
+ if (r == ARCHIVE_OK)
+ /* This filter always uses an external program. */
+ r = ARCHIVE_WARN;
+ return (r);
}