summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-04-17 01:03:52 +0000
committerkientzle <kientzle@FreeBSD.org>2009-04-17 01:03:52 +0000
commit6a280329f34008b16398e2d7198273e0899a7ca1 (patch)
treefa54c8be9024b2fa607c97e305eeee2e2178e034 /lib
parenta0fd30c50077ec522e4d3fbc956ebf953caed346 (diff)
downloadFreeBSD-src-6a280329f34008b16398e2d7198273e0899a7ca1.zip
FreeBSD-src-6a280329f34008b16398e2d7198273e0899a7ca1.tar.gz
Ensure that the option setters return OK (option used) even
for options that don't change the list of keywords.
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/archive_write_set_format_mtree.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libarchive/archive_write_set_format_mtree.c b/lib/libarchive/archive_write_set_format_mtree.c
index 0043030..22e4c56 100644
--- a/lib/libarchive/archive_write_set_format_mtree.c
+++ b/lib/libarchive/archive_write_set_format_mtree.c
@@ -962,8 +962,10 @@ archive_write_mtree_options(struct archive_write *a, const char *key,
case 'd':
if (strcmp(key, "device") == 0)
keybit = F_DEV;
- else if (strcmp(key, "dironly") == 0)
+ else if (strcmp(key, "dironly") == 0) {
mtree->dironly = (value != NULL)? 1: 0;
+ return (ARCHIVE_OK);
+ }
break;
case 'f':
if (strcmp(key, "flags") == 0)
@@ -976,8 +978,10 @@ archive_write_mtree_options(struct archive_write *a, const char *key,
keybit = F_GNAME;
break;
case 'i':
- if (strcmp(key, "indent") == 0)
+ if (strcmp(key, "indent") == 0) {
mtree->indent = (value != NULL)? 1: 0;
+ return (ARCHIVE_OK);
+ }
break;
case 'l':
if (strcmp(key, "link") == 0)
@@ -1039,8 +1043,10 @@ archive_write_mtree_options(struct archive_write *a, const char *key,
keybit = F_UID;
else if (strcmp(key, "uname") == 0)
keybit = F_UNAME;
- else if (strcmp(key, "use-set") == 0)
+ else if (strcmp(key, "use-set") == 0) {
mtree->set.output = (value != NULL)? 1: 0;
+ return (ARCHIVE_OK);
+ }
break;
}
if (keybit != 0) {
OpenPOWER on IntegriCloud