mirror of
https://github.com/ipxe/ipxe
synced 2025-12-10 13:32:20 +03:00
[settings] Allow settings blocks to specify a sibling ordering
Allow settings blocks to provide an explicit default ordering between
siblings, with lower precedence than the existing ${priority} setting.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -452,6 +452,8 @@ static void reprioritise_settings ( struct settings *settings ) {
|
||||
tmp_priority = fetch_intz_setting ( tmp, &priority_setting );
|
||||
if ( priority > tmp_priority )
|
||||
break;
|
||||
if ( settings->order > tmp->order )
|
||||
break;
|
||||
}
|
||||
list_add_tail ( &settings->siblings, &tmp->siblings );
|
||||
|
||||
|
||||
@@ -144,6 +144,8 @@ struct settings {
|
||||
struct settings_operations *op;
|
||||
/** Default scope for numerical settings constructed for this block */
|
||||
const struct settings_scope *default_scope;
|
||||
/** Sibling ordering */
|
||||
int order;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user