[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>
This commit is contained in:
Michael Brown
2010-12-01 16:34:23 +00:00
parent de6a59470b
commit 67b45186a5
10 changed files with 30 additions and 32 deletions

View File

@@ -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;