[settings] Allow for arbitrarily-named settings

This provides a mechanism for using arbitrarily-named variables within
gPXE, using the existing syntax for settings.
This commit is contained in:
Michael Brown
2009-05-26 11:05:58 +01:00
parent 822b3b53f4
commit 3c06277bbb
6 changed files with 297 additions and 99 deletions

View File

@@ -63,22 +63,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
( (_type) << 16 ) | \
( offsetof ( _structure, _field ) << 8 ) )
/**
* Store value of SMBIOS setting
*
* @v settings Settings block
* @v setting Setting to store
* @v data Setting data, or NULL to clear setting
* @v len Length of setting data
* @ret rc Return status code
*/
static int smbios_store ( struct settings *settings __unused,
struct setting *setting __unused,
const void *data __unused, size_t len __unused ) {
/* Cannot write data into SMBIOS */
return -ENOTSUP;
}
/**
* Fetch value of SMBIOS setting
*
@@ -135,7 +119,6 @@ static int smbios_fetch ( struct settings *settings __unused,
/** SMBIOS settings operations */
static struct settings_operations smbios_settings_operations = {
.store = smbios_store,
.fetch = smbios_fetch,
};