aboutsummaryrefslogtreecommitdiff
path: root/src/include/ipxe/parseopt.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2011-03-04 12:14:51 +0000
committerMichael Brown <mcb30@ipxe.org>2011-03-04 12:18:51 +0000
commit7d5dcc92994dae75831453b8d7fff411f23d9126 (patch)
tree2f12b637301709393c2c0d24aca6e6a1222ce272 /src/include/ipxe/parseopt.h
parent464cd1b3ce7e3214a3bbe5eb6f3889fa28fbb4b2 (diff)
downloadipxe-7d5dcc92994dae75831453b8d7fff411f23d9126.zip
ipxe-7d5dcc92994dae75831453b8d7fff411f23d9126.tar.gz
ipxe-7d5dcc92994dae75831453b8d7fff411f23d9126.tar.bz2
[parseopt] Refer to online documentation for command help
The online documentation (e.g. http://ipxe.org/cmd/ifopen), though not yet complete, is far more comprehensive than could be provided within the iPXE binary. Save around 200 bytes (compressed) by removing the command descriptions from the interactive help, and instead referring users directly to the web page describing the relevant command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/parseopt.h')
-rw-r--r--src/include/ipxe/parseopt.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/include/ipxe/parseopt.h b/src/include/ipxe/parseopt.h
index f949b4c..4cad3cc 100644
--- a/src/include/ipxe/parseopt.h
+++ b/src/include/ipxe/parseopt.h
@@ -81,12 +81,12 @@ struct command_descriptor {
uint8_t min_args;
/** Maximum number of non-option arguments */
uint8_t max_args;
- /** Command usage and description
+ /** Command usage
*
* This excludes the literal "Usage:" and the command name,
* which will be prepended automatically.
*/
- const char *usage_description;
+ const char *usage;
};
/** No maximum number of arguments */
@@ -99,11 +99,9 @@ struct command_descriptor {
* @v _options Option descriptor array
* @v _check_args Remaining argument checker
* @v _usage Command usage
- * @v _description Command description
* @ret _command Command descriptor
*/
-#define COMMAND_DESC( _struct, _options, _min_args, _max_args, _usage, \
- _description ) \
+#define COMMAND_DESC( _struct, _options, _min_args, _max_args, _usage ) \
{ \
.options = ( ( ( ( typeof ( _options[0] ) * ) NULL ) == \
( ( struct option_descriptor * ) NULL ) ) ? \
@@ -113,7 +111,7 @@ struct command_descriptor {
.len = sizeof ( _struct ), \
.min_args = _min_args, \
.max_args = _max_args, \
- .usage_description = _usage "\n\n" _description, \
+ .usage = _usage, \
}
extern int parse_string ( const char *text, const char **value );