From f3ac110d763782bd804157769efae6190d8caef7 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 18 Jan 2011 10:31:47 +0000 Subject: Added new flag for options OPTION_DRIVER_ONLY, and marked bios and ramsize as such, since they do not need to be loaded from parent drivers since those are quite driver dependent (no whatsnew) --- src/lib/util/options.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/lib/util/options.c') diff --git a/src/lib/util/options.c b/src/lib/util/options.c index 2d53f86aa39..d2d88e77174 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -250,6 +250,23 @@ void options_revert(core_options *opts, int priority) } } +/*------------------------------------------------- + options_revert_driver_only - revert options + that are marked as driver only and are under + priority level +-------------------------------------------------*/ + +void options_revert_driver_only(core_options *opts, int priority) +{ + options_data *data; + + /* iterate over options and revert to defaults if below the given priority */ + for (data = opts->datalist; data != NULL; data = data->next) + if ((data->flags & OPTION_DRIVER_ONLY) && (data->priority < priority)) { + astring_cpy(data->data, data->defdata); + data->priority = OPTION_PRIORITY_DEFAULT; + } +} /*------------------------------------------------- options_copy - copy options from one core_options -- cgit v1.2.3-70-g09d2