mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 12:00:19 +03:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user