summaryrefslogtreecommitdiff
path: root/libarchive/archive_write_set_format_iso9660.c
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-02-14 05:45:06 +0900
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-02-14 16:29:42 +0900
commitf30dc311bafff055bbcfcb272834566e15fce4dd (patch)
tree98a9ba64a9cca385af29791091f2e2f1c91fbe1d /libarchive/archive_write_set_format_iso9660.c
parent1ecb1bb23cc28c22e787f3bf5a65342bcb0f3282 (diff)
downloadlibarchive-f30dc311bafff055bbcfcb272834566e15fce4dd.tar.gz
Fix issue 237.
Properly set a clear error message when archive_{write,read}_set_options failed.
Diffstat (limited to 'libarchive/archive_write_set_format_iso9660.c')
-rw-r--r--libarchive/archive_write_set_format_iso9660.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libarchive/archive_write_set_format_iso9660.c b/libarchive/archive_write_set_format_iso9660.c
index fd4baa8c..7c9d926e 100644
--- a/libarchive/archive_write_set_format_iso9660.c
+++ b/libarchive/archive_write_set_format_iso9660.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2009-2011 Michihiro NAKAJIMA
+ * Copyright (c) 2009-2012 Michihiro NAKAJIMA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1507,6 +1507,11 @@ iso9660_options(struct archive_write *a, const char *key, const char *value)
break;
}
+ /* Note: The "warn" return is just to inform the options
+ * supervisor that we didn't handle it. It will generate
+ * a suitable error if no one used this option. */
+ return (ARCHIVE_WARN);
+
invalid_value:
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Invalid value for option ``%s''", key);