diff options
author | Michael Brown | 2013-07-22 17:13:25 +0200 |
---|---|---|
committer | Michael Brown | 2013-07-22 17:16:11 +0200 |
commit | b87020a0908669446796b83d57eaa2c093419621 (patch) | |
tree | 9c63e3ae5d0b5251811367d61b537516c96f7c2a /src/hci | |
parent | [settings] Remove now-unused store_named_setting() (diff) | |
download | ipxe-b87020a0908669446796b83d57eaa2c093419621.tar.gz ipxe-b87020a0908669446796b83d57eaa2c093419621.tar.xz ipxe-b87020a0908669446796b83d57eaa2c093419621.zip |
[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>
Diffstat (limited to 'src/hci')
-rw-r--r-- | src/hci/commands/fcmgmt_cmd.c | 7 | ||||
-rw-r--r-- | src/hci/commands/image_cmd.c | 2 | ||||
-rw-r--r-- | src/hci/commands/image_trust_cmd.c | 2 | ||||
-rw-r--r-- | src/hci/commands/menu_cmd.c | 8 |
4 files changed, 9 insertions, 10 deletions
diff --git a/src/hci/commands/fcmgmt_cmd.c b/src/hci/commands/fcmgmt_cmd.c index b7e38040..99f76113 100644 --- a/src/hci/commands/fcmgmt_cmd.c +++ b/src/hci/commands/fcmgmt_cmd.c @@ -43,7 +43,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * @ret port Fibre Channel port * @ret rc Return status code */ -static int parse_fc_port ( const char *text, struct fc_port **port ) { +static int parse_fc_port ( char *text, struct fc_port **port ) { /* Sanity check */ assert ( text != NULL ); @@ -65,7 +65,7 @@ static int parse_fc_port ( const char *text, struct fc_port **port ) { * @ret port_id Fibre Channel port ID * @ret rc Return status code */ -static int parse_fc_port_id ( const char *text, struct fc_port_id *port_id ) { +static int parse_fc_port_id ( char *text, struct fc_port_id *port_id ) { int rc; /* Sanity check */ @@ -87,8 +87,7 @@ static int parse_fc_port_id ( const char *text, struct fc_port_id *port_id ) { * @ret handler Fibre Channel ELS handler * @ret rc Return status code */ -static int parse_fc_els_handler ( const char *text, - struct fc_els_handler **handler ) { +static int parse_fc_els_handler ( char *text, struct fc_els_handler **handler ){ for_each_table_entry ( (*handler), FC_ELS_HANDLERS ) { if ( strcasecmp ( (*handler)->name, text ) == 0 ) diff --git a/src/hci/commands/image_cmd.c b/src/hci/commands/image_cmd.c index 6f51a6ba..17e22dcb 100644 --- a/src/hci/commands/image_cmd.c +++ b/src/hci/commands/image_cmd.c @@ -39,7 +39,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); /** "img{single}" options */ struct imgsingle_options { /** Image name */ - const char *name; + char *name; /** Replace image */ int replace; /** Free image after execution */ diff --git a/src/hci/commands/image_trust_cmd.c b/src/hci/commands/image_trust_cmd.c index e7a2bf12..ad238bff 100644 --- a/src/hci/commands/image_trust_cmd.c +++ b/src/hci/commands/image_trust_cmd.c @@ -84,7 +84,7 @@ static int imgtrust_exec ( int argc, char **argv ) { /** "imgverify" options */ struct imgverify_options { /** Required signer common name */ - const char *signer; + char *signer; /** Keep signature after verification */ int keep; }; diff --git a/src/hci/commands/menu_cmd.c b/src/hci/commands/menu_cmd.c index 10966db2..844ad703 100644 --- a/src/hci/commands/menu_cmd.c +++ b/src/hci/commands/menu_cmd.c @@ -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; }; |