mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 13:30:57 +03:00
[parseopt] Add support for boolean options
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user