mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 13:30:57 +03:00
[settings] Explicitly separate the concept of a completed fetched setting
The fetch_setting() family of functions may currently modify the definition of the specified setting (e.g. to add missing type information). Clean up this interface by requiring callers to provide an explicit buffer to contain the completed definition of the fetched setting, if required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -32,7 +32,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
*/
|
||||
|
||||
/** PCI device settings scope */
|
||||
static struct settings_scope pci_settings_scope;
|
||||
static const struct settings_scope pci_settings_scope;
|
||||
|
||||
/**
|
||||
* Check applicability of PCI device setting
|
||||
@@ -42,7 +42,7 @@ static struct settings_scope pci_settings_scope;
|
||||
* @ret applies Setting applies within this settings block
|
||||
*/
|
||||
static int pci_settings_applies ( struct settings *settings __unused,
|
||||
struct setting *setting ) {
|
||||
const struct setting *setting ) {
|
||||
|
||||
return ( setting->scope == &pci_settings_scope );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user