diff options
author | 2011-01-17 15:40:31 +0000 | |
---|---|---|
committer | 2011-01-17 15:40:31 +0000 | |
commit | 4725df36ac14570ab44644ccb3bc3f138043842a (patch) | |
tree | 2fbb799a9111aa98033a37120690a4371dda93ef /src/lib/util/options.c | |
parent | 9fd74516f66f8e41cb611746b7e63a4dea06b575 (diff) |
Fixed some long standing issues with image device config (no whatsnew)
Diffstat (limited to 'src/lib/util/options.c')
-rw-r--r-- | src/lib/util/options.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c index 705d4dfda2f..2d53f86aa39 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -309,7 +309,7 @@ int options_equal(core_options *opts1, core_options *opts2) current options sets -------------------------------------------------*/ -int options_add_entries(core_options *opts, const options_entry *entrylist) +int options_add_entries(core_options *opts, const options_entry *entrylist, int force) { /* loop over entries until we hit a NULL name */ for ( ; entrylist->name != NULL || (entrylist->flags & OPTION_HEADER); entrylist++) @@ -333,7 +333,7 @@ int options_add_entries(core_options *opts, const options_entry *entrylist) match = find_entry_data(opts, astring_c(data->links[i].name), FALSE); /* if so, throw away this entry and replace the data */ - if (match != NULL) + if ((force == FALSE) && (match != NULL)) { /* free what we've allocated so far */ for (i = 0; i < ARRAY_LENGTH(data->links); i++) @@ -384,6 +384,10 @@ int options_add_entries(core_options *opts, const options_entry *entrylist) return TRUE; } +int options_add_entries(core_options *opts, const options_entry *entrylist) +{ + return options_add_entries(opts,entrylist,FALSE); +} /*------------------------------------------------- options_set_option_default_value - change the |