diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-06-20 16:20:05 -0700 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-06-20 16:24:38 -0700 |
commit | 039019039e89aedf4c5a0d81c351638a1e036335 (patch) | |
tree | 8af0293694ba5095d2bb9e6cb318d4e27e9726a2 /src/hci/commands/dynui_cmd.c | |
parent | c8e50bb0fd3d9d1629e5c78f92bbf7bc9af84f2c (diff) | |
download | ipxe-039019039e89aedf4c5a0d81c351638a1e036335.tar.gz |
[dynui] Allow for multiple flags on a user interface item
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci/commands/dynui_cmd.c')
-rw-r--r-- | src/hci/commands/dynui_cmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hci/commands/dynui_cmd.c b/src/hci/commands/dynui_cmd.c index dbaa669ef..557c5db5d 100644 --- a/src/hci/commands/dynui_cmd.c +++ b/src/hci/commands/dynui_cmd.c @@ -148,6 +148,7 @@ static int item_exec ( int argc, char **argv ) { struct item_options opts; struct dynamic_ui *dynui; struct dynamic_item *item; + unsigned int flags = 0; char *name = NULL; char *text = NULL; int rc; @@ -174,8 +175,10 @@ static int item_exec ( int argc, char **argv ) { goto err_parse_dynui; /* Add dynamic user interface item */ - item = add_dynui_item ( dynui, name, ( text ? text : "" ), - opts.key, opts.is_default ); + if ( opts.is_default ) + flags |= DYNUI_DEFAULT; + item = add_dynui_item ( dynui, name, ( text ? text : "" ), flags, + opts.key ); if ( ! item ) { rc = -ENOMEM; goto err_add_dynui_item; |