]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Allow setting help text URI to be customised via config/branding.h
authorMichael Brown <mcb30@ipxe.org>
Wed, 11 Feb 2015 13:57:34 +0000 (13:57 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 11 Feb 2015 14:11:28 +0000 (14:11 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/config/branding.h
src/hci/tui/settings_ui.c
src/interface/efi/efi_snp_hii.c

index 43f7592dff4efbec263005031506b4ce13331243..d1d4c4e1bf3ec5407b7201421bfbd03b4ec0e171 100644 (file)
@@ -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 */
index b2e019e740de4f1b67787598acf42153fb83724a..e66abe94f2588dba11630fd8c25a20ab08ba5940 100644 (file)
@@ -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 );
 }
 
index c49c76a32377ff80a29b37f99d946a82a77903f5..9fadc92879c46b112f3b6ebdba3af4109c5ab14a 100644 (file)
@@ -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,