mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 20:40:25 +03:00
[parseopt] Add parse_netdev_configurator()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -139,6 +139,29 @@ int parse_netdev ( char *text, struct net_device **netdev ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse network device configurator name
|
||||
*
|
||||
* @v text Text
|
||||
* @ret configurator Network device configurator
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int parse_netdev_configurator ( char *text,
|
||||
struct net_device_configurator **configurator ){
|
||||
|
||||
/* Sanity check */
|
||||
assert ( text != NULL );
|
||||
|
||||
/* Find network device configurator */
|
||||
*configurator = find_netdev_configurator ( text );
|
||||
if ( ! *configurator ) {
|
||||
printf ( "\"%s\": no such configurator\n", text );
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse menu name
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user