mirror of https://github.com/ipxe/ipxe.git
[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>pull/56/head
parent
1fdc7da435
commit
f5cf4f706e
|
@ -452,6 +452,8 @@ static void reprioritise_settings ( struct settings *settings ) {
|
||||||
tmp_priority = fetch_intz_setting ( tmp, &priority_setting );
|
tmp_priority = fetch_intz_setting ( tmp, &priority_setting );
|
||||||
if ( priority > tmp_priority )
|
if ( priority > tmp_priority )
|
||||||
break;
|
break;
|
||||||
|
if ( settings->order > tmp->order )
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
list_add_tail ( &settings->siblings, &tmp->siblings );
|
list_add_tail ( &settings->siblings, &tmp->siblings );
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,8 @@ struct settings {
|
||||||
struct settings_operations *op;
|
struct settings_operations *op;
|
||||||
/** Default scope for numerical settings constructed for this block */
|
/** Default scope for numerical settings constructed for this block */
|
||||||
const struct settings_scope *default_scope;
|
const struct settings_scope *default_scope;
|
||||||
|
/** Sibling ordering */
|
||||||
|
int order;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue