[dhcp] Split PXE menuing code out of dhcp.c
The DHCP client code now implements only the mechanism of the DHCP and PXE Boot Server protocols. Boot Server Discovery can be initiated manually using the "pxebs" command. The menuing code is separated out into a user-level function on a par with boot_root_path(), and is entered in preference to a normal filename boot if the DHCP vendor class is "PXEClient" and the PXE boot menu option exists.
This commit is contained in:
@@ -304,4 +304,16 @@ static inline int delete_named_setting ( const char *name ) {
|
||||
return storef_named_setting ( name, NULL );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check existence of setting
|
||||
*
|
||||
* @v settings Settings block, or NULL to search all blocks
|
||||
* @v setting Setting to fetch
|
||||
* @ret exists Setting exists
|
||||
*/
|
||||
static inline int setting_exists ( struct settings *settings,
|
||||
struct setting *setting ) {
|
||||
return ( fetch_setting_len ( settings, setting ) >= 0 );
|
||||
}
|
||||
|
||||
#endif /* _GPXE_SETTINGS_H */
|
||||
|
||||
Reference in New Issue
Block a user