summaryrefslogtreecommitdiffstats
path: root/src/interface/smbios
diff options
context:
space:
mode:
authorMichael Brown2010-12-01 17:34:23 +0100
committerMichael Brown2010-12-01 17:35:00 +0100
commit67b45186a572fb051e73fd88d4fc580a0d4d2f6b (patch)
tree9c1b23f9ceab3f9e9bf3ca0563103bc6230c0ee5 /src/interface/smbios
parent[iscsi] Disambiguate the common EINVAL cases (diff)
downloadipxe-67b45186a572fb051e73fd88d4fc580a0d4d2f6b.tar.gz
ipxe-67b45186a572fb051e73fd88d4fc580a0d4d2f6b.tar.xz
ipxe-67b45186a572fb051e73fd88d4fc580a0d4d2f6b.zip
[settings] Apply settings block name in register_settings()
Pass the settings block name as a parameter to register_settings(), rather than defining it with settings_init() (and then possibly changing it by directly manipulating settings->name). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/smbios')
-rw-r--r--src/interface/smbios/smbios_settings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interface/smbios/smbios_settings.c b/src/interface/smbios/smbios_settings.c
index 09e1a578..bb7c18dd 100644
--- a/src/interface/smbios/smbios_settings.c
+++ b/src/interface/smbios/smbios_settings.c
@@ -125,7 +125,6 @@ static struct settings_operations smbios_settings_operations = {
/** SMBIOS settings */
static struct settings smbios_settings = {
.refcnt = NULL,
- .name = "smbios",
.tag_magic = SMBIOS_EMPTY_TAG,
.siblings = LIST_HEAD_INIT ( smbios_settings.siblings ),
.children = LIST_HEAD_INIT ( smbios_settings.children ),
@@ -136,7 +135,8 @@ static struct settings smbios_settings = {
static void smbios_init ( void ) {
int rc;
- if ( ( rc = register_settings ( &smbios_settings, NULL ) ) != 0 ) {
+ if ( ( rc = register_settings ( &smbios_settings, NULL,
+ "smbios" ) ) != 0 ) {
DBG ( "SMBIOS could not register settings: %s\n",
strerror ( rc ) );
return;