소스 검색

[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 년 전
부모
커밋
b06fdcf936
3개의 변경된 파일46개의 추가작업 그리고 3개의 파일을 삭제
  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 파일 보기

@@ -117,6 +117,49 @@ FILE_LICENCE ( GPL2_OR_LATER );
117 117
  */
118 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 163
 #include <config/local/branding.h>
121 164
 
122 165
 #endif /* CONFIG_BRANDING_H */

+ 1
- 2
src/hci/tui/settings_ui.c 파일 보기

@@ -378,8 +378,7 @@ static void draw_info_row ( struct setting_widget *widget ) {
378 378
 	msg ( INFO_ROW, "%s - %s", buf, widget->row.setting.description );
379 379
 	attroff ( A_BOLD );
380 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 382
 	color_set ( CPAIR_NORMAL, NULL );
384 383
 }
385 384
 

+ 2
- 1
src/interface/efi/efi_snp_hii.c 파일 보기

@@ -59,6 +59,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
59 59
 #include <ipxe/efi/efi_hii.h>
60 60
 #include <ipxe/efi/efi_snp.h>
61 61
 #include <ipxe/efi/efi_strings.h>
62
+#include <config/branding.h>
62 63
 
63 64
 /** EFI platform setup formset GUID */
64 65
 static EFI_GUID efi_hii_platform_setup_formset_guid
@@ -136,7 +137,7 @@ static void efi_snp_hii_questions ( struct efi_snp_device *snpdev,
136 137
 		previous = setting;
137 138
 		name_id = efi_ifr_string ( ifr, "%s", setting->name );
138 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 141
 					   setting->name );
141 142
 		question_id = setting->tag;
142 143
 		efi_ifr_string_op ( ifr, prompt_id, help_id,

Loading…
취소
저장