summaryrefslogtreecommitdiffstats
path: root/src/arch/x86
diff options
context:
space:
mode:
authorMichael Brown2013-12-03 17:48:56 +0100
committerMichael Brown2013-12-05 01:37:02 +0100
commit22001cb206c1320aee27f679a63d2171d35e99c5 (patch)
treea972bb914371a68d4925dcc007238dcb836546ba /src/arch/x86
parent[fbcon] Add support for displaying a cursor (diff)
downloadipxe-22001cb206c1320aee27f679a63d2171d35e99c5.tar.gz
ipxe-22001cb206c1320aee27f679a63d2171d35e99c5.tar.xz
ipxe-22001cb206c1320aee27f679a63d2171d35e99c5.zip
[settings] Explicitly separate the concept of a completed fetched setting
The fetch_setting() family of functions may currently modify the definition of the specified setting (e.g. to add missing type information). Clean up this interface by requiring callers to provide an explicit buffer to contain the completed definition of the fetched setting, if required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/core/cpuid_settings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/x86/core/cpuid_settings.c b/src/arch/x86/core/cpuid_settings.c
index e2ec9bde6..2da859ee9 100644
--- a/src/arch/x86/core/cpuid_settings.c
+++ b/src/arch/x86/core/cpuid_settings.c
@@ -117,7 +117,7 @@ enum cpuid_registers {
#define CPUID_NUM_REGISTERS( tag ) ( ( ( (tag) >> 16 ) & 0x3 ) + 1 )
/** CPUID settings scope */
-static struct settings_scope cpuid_settings_scope;
+static const struct settings_scope cpuid_settings_scope;
/**
* Check applicability of CPUID setting
@@ -127,7 +127,7 @@ static struct settings_scope cpuid_settings_scope;
* @ret applies Setting applies within this settings block
*/
static int cpuid_settings_applies ( struct settings *settings __unused,
- struct setting *setting ) {
+ const struct setting *setting ) {
return ( setting->scope == &cpuid_settings_scope );
}
@@ -252,7 +252,7 @@ struct init_fn cpuid_settings_init_fn __init_fn ( INIT_NORMAL ) = {
};
/** CPUID predefined settings */
-struct setting cpuid_predefined_settings[] __setting ( SETTING_HOST_EXTRA ) = {
+const struct setting cpuid_predefined_settings[] __setting ( SETTING_HOST_EXTRA ) = {
{
.name = "cpuvendor",
.description = "CPU vendor",