mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 17:12:40 +03:00
[parseopt] Allow parsed option to be modified
Parsing a setting name requires the ability to modify the text being parsed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -41,7 +41,7 @@ FEATURE ( FEATURE_MISC, "Menu", DHCP_EB_FEATURE_MENU, 1 );
|
||||
/** "menu" options */
|
||||
struct menu_options {
|
||||
/** Name */
|
||||
const char *name;
|
||||
char *name;
|
||||
/** Delete */
|
||||
int delete;
|
||||
};
|
||||
@@ -107,7 +107,7 @@ static int menu_exec ( int argc, char **argv ) {
|
||||
/** "item" options */
|
||||
struct item_options {
|
||||
/** Menu name */
|
||||
const char *menu;
|
||||
char *menu;
|
||||
/** Shortcut key */
|
||||
unsigned int key;
|
||||
/** Use as default */
|
||||
@@ -192,11 +192,11 @@ static int item_exec ( int argc, char **argv ) {
|
||||
/** "choose" options */
|
||||
struct choose_options {
|
||||
/** Menu name */
|
||||
const char *menu;
|
||||
char *menu;
|
||||
/** Timeout */
|
||||
unsigned int timeout;
|
||||
/** Default selection */
|
||||
const char *select;
|
||||
char *select;
|
||||
/** Keep menu */
|
||||
int keep;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user