mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 05:21:49 +03:00
[Settings] Add settings hierarchy
Add the notion of the settings hierarchy, complete with register/unregister routines. Rename set->store and get->fetch to avoid naming conflicts with get/put as used in reference counting.
This commit is contained in:
@@ -114,9 +114,9 @@ static void load_setting ( struct setting_widget *widget ) {
|
||||
widget->editing = 0;
|
||||
|
||||
/* Read current setting value */
|
||||
if ( get_typed_setting ( widget->settings, widget->setting->tag,
|
||||
widget->setting->type, widget->value,
|
||||
sizeof ( widget->value ) ) < 0 ) {
|
||||
if ( fetch_typed_setting ( widget->settings, widget->setting->tag,
|
||||
widget->setting->type, widget->value,
|
||||
sizeof ( widget->value ) ) < 0 ) {
|
||||
widget->value[0] = '\0';
|
||||
}
|
||||
|
||||
@@ -133,8 +133,8 @@ static void load_setting ( struct setting_widget *widget ) {
|
||||
* @v widget Setting widget
|
||||
*/
|
||||
static int save_setting ( struct setting_widget *widget ) {
|
||||
return set_typed_setting ( widget->settings, widget->setting->tag,
|
||||
widget->setting->type, widget->value );
|
||||
return store_typed_setting ( widget->settings, widget->setting->tag,
|
||||
widget->setting->type, widget->value );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user