diff options
Diffstat (limited to 'src/interface')
| -rw-r--r-- | src/interface/efi/efi_snp_hii.c | 8 | ||||
| -rw-r--r-- | src/interface/smbios/smbios_settings.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/interface/efi/efi_snp_hii.c b/src/interface/efi/efi_snp_hii.c index 9ea15a623..61954b632 100644 --- a/src/interface/efi/efi_snp_hii.c +++ b/src/interface/efi/efi_snp_hii.c @@ -276,7 +276,9 @@ static int efi_snp_hii_fetch ( struct efi_snp_device *snpdev, const char *key, const char *value, wchar_t **results, int *have_setting ) { struct settings *settings = efi_snp_hii_settings ( snpdev ); + struct settings *origin; struct setting *setting; + struct setting fetched; int len; char *buf; char *encoded; @@ -311,7 +313,8 @@ static int efi_snp_hii_fetch ( struct efi_snp_device *snpdev, if ( setting_exists ( settings, setting ) ) { /* Calculate formatted length */ - len = fetchf_setting ( settings, setting, NULL, 0 ); + len = fetchf_setting ( settings, setting, &origin, &fetched, + NULL, 0 ); if ( len < 0 ) { rc = len; DBGC ( snpdev, "SNPDEV %p could not fetch %s: %s\n", @@ -328,7 +331,8 @@ static int efi_snp_hii_fetch ( struct efi_snp_device *snpdev, encoded = ( buf + len + 1 /* NUL */ ); /* Format value */ - fetchf_setting ( settings, setting, buf, ( len + 1 /* NUL */ )); + fetchf_setting ( origin, &fetched, NULL, NULL, buf, + ( len + 1 /* NUL */ ) ); for ( i = 0 ; i < len ; i++ ) { sprintf ( ( encoded + ( 4 * i ) ), "%04x", *( ( uint8_t * ) buf + i ) ); diff --git a/src/interface/smbios/smbios_settings.c b/src/interface/smbios/smbios_settings.c index ecd3f1d97..9995bd751 100644 --- a/src/interface/smbios/smbios_settings.c +++ b/src/interface/smbios/smbios_settings.c @@ -28,7 +28,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/smbios.h> /** SMBIOS settings scope */ -static struct settings_scope smbios_settings_scope; +static const struct settings_scope smbios_settings_scope; /** * Construct SMBIOS raw-data tag @@ -63,7 +63,7 @@ static struct settings_scope smbios_settings_scope; * @ret applies Setting applies within this settings block */ static int smbios_applies ( struct settings *settings __unused, - struct setting *setting ) { + const struct setting *setting ) { return ( setting->scope == &smbios_settings_scope ); } @@ -188,7 +188,7 @@ struct init_fn smbios_init_fn __init_fn ( INIT_NORMAL ) = { }; /** UUID setting obtained via SMBIOS */ -struct setting uuid_setting __setting ( SETTING_HOST ) = { +const struct setting uuid_setting __setting ( SETTING_HOST ) = { .name = "uuid", .description = "UUID", .tag = SMBIOS_RAW_TAG ( SMBIOS_TYPE_SYSTEM_INFORMATION, @@ -198,7 +198,7 @@ struct setting uuid_setting __setting ( SETTING_HOST ) = { }; /** Other SMBIOS predefined settings */ -struct setting smbios_predefined_settings[] __setting ( SETTING_HOST_EXTRA ) = { +const struct setting smbios_predefined_settings[] __setting ( SETTING_HOST_EXTRA ) = { { .name = "manufacturer", .description = "Manufacturer", |
