[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:
Michael Brown
2009-02-01 01:21:40 +00:00
parent d2b0081740
commit e65afc4b10
17 changed files with 1379 additions and 973 deletions
+12
View File
@@ -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 */