mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 20:40:25 +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:
@@ -193,7 +193,7 @@ static int nvo_save ( struct nvo_block *nvo ) {
|
||||
* @ret applies Setting applies within this settings block
|
||||
*/
|
||||
int nvo_applies ( struct settings *settings __unused,
|
||||
struct setting *setting ) {
|
||||
const struct setting *setting ) {
|
||||
|
||||
return ( ( setting->scope == NULL ) &&
|
||||
dhcpopt_applies ( setting->tag ) );
|
||||
@@ -208,7 +208,7 @@ int nvo_applies ( struct settings *settings __unused,
|
||||
* @v len Length of setting data
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int nvo_store ( struct settings *settings, struct setting *setting,
|
||||
static int nvo_store ( struct settings *settings, const struct setting *setting,
|
||||
const void *data, size_t len ) {
|
||||
struct nvo_block *nvo =
|
||||
container_of ( settings, struct nvo_block, settings );
|
||||
|
||||
Reference in New Issue
Block a user