[parseopt] Add support for boolean options

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2011-03-27 12:46:55 +01:00
parent 3f442d3f60
commit a246434299
2 changed files with 16 additions and 0 deletions

View File

@@ -125,6 +125,21 @@ int parse_image ( const char *text, struct image **image ) {
return 0;
}
/**
* 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
*