summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2015-02-11 14:57:34 +0100
committerMichael Brown2015-02-11 15:11:28 +0100
commitb06fdcf93668670b481491dc97f025e6efe5f450 (patch)
treef9c6bc9212672d07e87baa79929a447bbe029fe7 /src
parent[build] Allow command help text URI to be customised via config/branding.h (diff)
downloadipxe-b06fdcf93668670b481491dc97f025e6efe5f450.tar.gz
ipxe-b06fdcf93668670b481491dc97f025e6efe5f450.tar.xz
ipxe-b06fdcf93668670b481491dc97f025e6efe5f450.zip
[build] Allow setting help text URI to be customised via config/branding.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/config/branding.h43
-rw-r--r--src/hci/tui/settings_ui.c3
-rw-r--r--src/interface/efi/efi_snp_hii.c3
3 files changed, 46 insertions, 3 deletions
diff --git a/src/config/branding.h b/src/config/branding.h
index 43f7592d..d1d4c4e1 100644
--- a/src/config/branding.h
+++ b/src/config/branding.h
@@ -117,6 +117,49 @@ FILE_LICENCE ( GPL2_OR_LATER );
*/
#define PRODUCT_COMMAND_URI "http://ipxe.org/cmd/%s"
+/*
+ * Setting help messages
+ *
+ * iPXE setting help messages include a URI constructed from the
+ * setting name, such as
+ *
+ * "http://ipxe.org/cfg/initiator-iqn"
+ *
+ * The iPXE web site includes documentation for the settings used by
+ * iPXE, including:
+ *
+ * - details of the corresponding DHCP option number.
+ *
+ * - details of the corresponding ISC dhcpd option name.
+ *
+ * - examples of using the setting from the iPXE command line, or in
+ * iPXE scripts.
+ *
+ * - examples of configuring the setting via a DHCP server.
+ *
+ * - a formal description of the setting.
+ *
+ * - links to documentation for related settings.
+ *
+ * - links to documentation for relevant build options.
+ *
+ * - general notes about the setting.
+ *
+ * If you want to provide your own documentation for all of the
+ * settings used by iPXE, rather than using the existing support
+ * infrastructure provided by http://ipxe.org, then you may define a
+ * custom URI to be included within setting help messages.
+ *
+ * Note that the custom URI is a printf() format string which must
+ * include a format specifier for the setting name.
+ *
+ * [ Please also note that the existing documentation is licensed
+ * under Creative Commons terms which require attribution to the
+ * iPXE project and prohibit the alteration or removal of any
+ * references to "iPXE". ]
+ */
+#define PRODUCT_SETTING_URI "http://ipxe.org/cfg/%s"
+
#include <config/local/branding.h>
#endif /* CONFIG_BRANDING_H */
diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c
index b2e019e7..e66abe94 100644
--- a/src/hci/tui/settings_ui.c
+++ b/src/hci/tui/settings_ui.c
@@ -378,8 +378,7 @@ static void draw_info_row ( struct setting_widget *widget ) {
msg ( INFO_ROW, "%s - %s", buf, widget->row.setting.description );
attroff ( A_BOLD );
color_set ( CPAIR_URL, NULL );
- msg ( ( INFO_ROW + 1 ), "http://ipxe.org/cfg/%s",
- widget->row.setting.name );
+ msg ( ( INFO_ROW + 1 ), PRODUCT_SETTING_URI, widget->row.setting.name );
color_set ( CPAIR_NORMAL, NULL );
}
diff --git a/src/interface/efi/efi_snp_hii.c b/src/interface/efi/efi_snp_hii.c
index c49c76a3..9fadc928 100644
--- a/src/interface/efi/efi_snp_hii.c
+++ b/src/interface/efi/efi_snp_hii.c
@@ -59,6 +59,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/efi/efi_hii.h>
#include <ipxe/efi/efi_snp.h>
#include <ipxe/efi/efi_strings.h>
+#include <config/branding.h>
/** EFI platform setup formset GUID */
static EFI_GUID efi_hii_platform_setup_formset_guid
@@ -136,7 +137,7 @@ static void efi_snp_hii_questions ( struct efi_snp_device *snpdev,
previous = setting;
name_id = efi_ifr_string ( ifr, "%s", setting->name );
prompt_id = efi_ifr_string ( ifr, "%s", setting->description );
- help_id = efi_ifr_string ( ifr, "http://ipxe.org/cfg/%s",
+ help_id = efi_ifr_string ( ifr, PRODUCT_SETTING_URI,
setting->name );
question_id = setting->tag;
efi_ifr_string_op ( ifr, prompt_id, help_id,