summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/settings.h
diff options
context:
space:
mode:
authorMichael Brown2009-01-31 08:36:05 +0100
committerMichael Brown2009-02-01 02:21:40 +0100
commite65afc4b10552ec9ac7de2f0d924b96bc71aaad0 (patch)
tree36e528a6d947aa8701208953e74cd496728955b4 /src/include/gpxe/settings.h
parent[settings] Avoid duplicate settings block names (diff)
downloadipxe-e65afc4b10552ec9ac7de2f0d924b96bc71aaad0.tar.gz
ipxe-e65afc4b10552ec9ac7de2f0d924b96bc71aaad0.tar.xz
ipxe-e65afc4b10552ec9ac7de2f0d924b96bc71aaad0.zip
[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.
Diffstat (limited to 'src/include/gpxe/settings.h')
-rw-r--r--src/include/gpxe/settings.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/gpxe/settings.h b/src/include/gpxe/settings.h
index 60244d3a..bf80b1e1 100644
--- a/src/include/gpxe/settings.h
+++ b/src/include/gpxe/settings.h
@@ -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 */