diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-02-14 05:45:06 +0900 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-02-14 16:29:42 +0900 |
commit | f30dc311bafff055bbcfcb272834566e15fce4dd (patch) | |
tree | 98a9ba64a9cca385af29791091f2e2f1c91fbe1d /libarchive/archive_write_set_format_iso9660.c | |
parent | 1ecb1bb23cc28c22e787f3bf5a65342bcb0f3282 (diff) | |
download | libarchive-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.c | 7 |
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); |