diff options
author | Michael Brown | 2011-03-27 13:46:55 +0200 |
---|---|---|
committer | Michael Brown | 2011-03-27 13:46:55 +0200 |
commit | a2464342991ccd957e252c98fa7f383fcd873bae (patch) | |
tree | 457ca9cb281695c03e5750fc7ee2fd8ac30f6508 /src/core/parseopt.c | |
parent | [tcp] Record ts_recent on first received packet (diff) | |
download | ipxe-a2464342991ccd957e252c98fa7f383fcd873bae.tar.gz ipxe-a2464342991ccd957e252c98fa7f383fcd873bae.tar.xz ipxe-a2464342991ccd957e252c98fa7f383fcd873bae.zip |
[parseopt] Add support for boolean options
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/parseopt.c')
-rw-r--r-- | src/core/parseopt.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/parseopt.c b/src/core/parseopt.c index 451ebaf5..24a57624 100644 --- a/src/core/parseopt.c +++ b/src/core/parseopt.c @@ -126,6 +126,21 @@ int parse_image ( const char *text, struct image **image ) { } /** + * Parse flag + * + * @v text Text (ignored) + * @ret flag Flag to set + * @ret rc Return status code + */ +int parse_flag ( const char *text __unused, int *flag ) { + + /* Set flag */ + *flag = 1; + + return 0; +} + +/** * Print command usage message * * @v cmd Command descriptor |