mirror of
https://github.com/ipxe/ipxe
synced 2026-01-02 09:52:49 +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:
@@ -226,7 +226,7 @@ int dhcppkt_fetch ( struct dhcp_packet *dhcppkt, unsigned int tag,
|
||||
* @ret applies Setting applies within this settings block
|
||||
*/
|
||||
static int dhcppkt_settings_applies ( struct settings *settings,
|
||||
struct setting *setting ) {
|
||||
const struct setting *setting ) {
|
||||
struct dhcp_packet *dhcppkt =
|
||||
container_of ( settings, struct dhcp_packet, settings );
|
||||
|
||||
@@ -244,7 +244,7 @@ static int dhcppkt_settings_applies ( struct settings *settings,
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int dhcppkt_settings_store ( struct settings *settings,
|
||||
struct setting *setting,
|
||||
const struct setting *setting,
|
||||
const void *data, size_t len ) {
|
||||
struct dhcp_packet *dhcppkt =
|
||||
container_of ( settings, struct dhcp_packet, settings );
|
||||
|
||||
Reference in New Issue
Block a user