Bläddra i källkod

[build] Allow setting help text URI to be customised via config/branding.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 år sedan
förälder
incheckning
b06fdcf936
3 ändrade filer med 46 tillägg och 3 borttagningar
  1. 43
    0
      src/config/branding.h
  2. 1
    2
      src/hci/tui/settings_ui.c
  3. 2
    1
      src/interface/efi/efi_snp_hii.c

+ 43
- 0
src/config/branding.h Visa fil

117
  */
117
  */
118
 #define PRODUCT_COMMAND_URI "http://ipxe.org/cmd/%s"
118
 #define PRODUCT_COMMAND_URI "http://ipxe.org/cmd/%s"
119
 
119
 
120
+/*
121
+ * Setting help messages
122
+ *
123
+ * iPXE setting help messages include a URI constructed from the
124
+ * setting name, such as
125
+ *
126
+ *   "http://ipxe.org/cfg/initiator-iqn"
127
+ *
128
+ * The iPXE web site includes documentation for the settings used by
129
+ * iPXE, including:
130
+ *
131
+ * - details of the corresponding DHCP option number.
132
+ *
133
+ * - details of the corresponding ISC dhcpd option name.
134
+ *
135
+ * - examples of using the setting from the iPXE command line, or in
136
+ *   iPXE scripts.
137
+ *
138
+ * - examples of configuring the setting via a DHCP server.
139
+ *
140
+ * - a formal description of the setting.
141
+ *
142
+ * - links to documentation for related settings.
143
+ *
144
+ * - links to documentation for relevant build options.
145
+ *
146
+ * - general notes about the setting.
147
+ *
148
+ * If you want to provide your own documentation for all of the
149
+ * settings used by iPXE, rather than using the existing support
150
+ * infrastructure provided by http://ipxe.org, then you may define a
151
+ * custom URI to be included within setting help messages.
152
+ *
153
+ * Note that the custom URI is a printf() format string which must
154
+ * include a format specifier for the setting name.
155
+ *
156
+ * [ Please also note that the existing documentation is licensed
157
+ *   under Creative Commons terms which require attribution to the
158
+ *   iPXE project and prohibit the alteration or removal of any
159
+ *   references to "iPXE". ]
160
+ */
161
+#define PRODUCT_SETTING_URI "http://ipxe.org/cfg/%s"
162
+
120
 #include <config/local/branding.h>
163
 #include <config/local/branding.h>
121
 
164
 
122
 #endif /* CONFIG_BRANDING_H */
165
 #endif /* CONFIG_BRANDING_H */

+ 1
- 2
src/hci/tui/settings_ui.c Visa fil

378
 	msg ( INFO_ROW, "%s - %s", buf, widget->row.setting.description );
378
 	msg ( INFO_ROW, "%s - %s", buf, widget->row.setting.description );
379
 	attroff ( A_BOLD );
379
 	attroff ( A_BOLD );
380
 	color_set ( CPAIR_URL, NULL );
380
 	color_set ( CPAIR_URL, NULL );
381
-	msg ( ( INFO_ROW + 1 ), "http://ipxe.org/cfg/%s",
382
-	      widget->row.setting.name );
381
+	msg ( ( INFO_ROW + 1 ), PRODUCT_SETTING_URI, widget->row.setting.name );
383
 	color_set ( CPAIR_NORMAL, NULL );
382
 	color_set ( CPAIR_NORMAL, NULL );
384
 }
383
 }
385
 
384
 

+ 2
- 1
src/interface/efi/efi_snp_hii.c Visa fil

59
 #include <ipxe/efi/efi_hii.h>
59
 #include <ipxe/efi/efi_hii.h>
60
 #include <ipxe/efi/efi_snp.h>
60
 #include <ipxe/efi/efi_snp.h>
61
 #include <ipxe/efi/efi_strings.h>
61
 #include <ipxe/efi/efi_strings.h>
62
+#include <config/branding.h>
62
 
63
 
63
 /** EFI platform setup formset GUID */
64
 /** EFI platform setup formset GUID */
64
 static EFI_GUID efi_hii_platform_setup_formset_guid
65
 static EFI_GUID efi_hii_platform_setup_formset_guid
136
 		previous = setting;
137
 		previous = setting;
137
 		name_id = efi_ifr_string ( ifr, "%s", setting->name );
138
 		name_id = efi_ifr_string ( ifr, "%s", setting->name );
138
 		prompt_id = efi_ifr_string ( ifr, "%s", setting->description );
139
 		prompt_id = efi_ifr_string ( ifr, "%s", setting->description );
139
-		help_id = efi_ifr_string ( ifr, "http://ipxe.org/cfg/%s",
140
+		help_id = efi_ifr_string ( ifr, PRODUCT_SETTING_URI,
140
 					   setting->name );
141
 					   setting->name );
141
 		question_id = setting->tag;
142
 		question_id = setting->tag;
142
 		efi_ifr_string_op ( ifr, prompt_id, help_id,
143
 		efi_ifr_string_op ( ifr, prompt_id, help_id,

Laddar…
Avbryt
Spara