Kaynağa Gözat

[build] Use PRODUCT_SHORT_NAME for end-user visible strings

Use PRODUCT_SHORT_NAME instead of a hardcoded "iPXE" for strings which
are typically shown in the user interface.

Note that this only allows for customisation of the user interface.
Where the "iPXE" string serves a technical purpose (such as in the
HTTP User-Agent), the string cannot be customised.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 yıl önce
ebeveyn
işleme
544a6a9769

+ 2
- 1
src/arch/i386/prefix/romprefix.S Dosyayı Görüntüle

@@ -590,7 +590,8 @@ init_message:
590 590
 	.ascii	"\n"
591 591
 	.ascii	PRODUCT_NAME
592 592
 	.ascii	"\n"
593
-	.asciz	"iPXE (http://ipxe.org)"
593
+	.ascii	PRODUCT_SHORT_NAME
594
+	.asciz	" (http://ipxe.org)"
594 595
 	.size	init_message, . - init_message
595 596
 .ifeqs	BUSTYPE, "PCIR"
596 597
 init_message_pci:

+ 2
- 1
src/hci/shell.c Dosyayı Görüntüle

@@ -28,6 +28,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
28 28
 #include <ipxe/command.h>
29 29
 #include <ipxe/parseopt.h>
30 30
 #include <ipxe/shell.h>
31
+#include <config/branding.h>
31 32
 
32 33
 /** @file
33 34
  *
@@ -36,7 +37,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
36 37
  */
37 38
 
38 39
 /** The shell prompt string */
39
-static const char shell_prompt[] = "iPXE> ";
40
+static const char shell_prompt[] = PRODUCT_SHORT_NAME "> ";
40 41
 
41 42
 /**
42 43
  * "help" command

+ 2
- 1
src/hci/tui/settings_ui.c Dosyayı Görüntüle

@@ -30,6 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
30 30
 #include <ipxe/keys.h>
31 31
 #include <ipxe/ansicol.h>
32 32
 #include <ipxe/settings_ui.h>
33
+#include <config/branding.h>
33 34
 
34 35
 /** @file
35 36
  *
@@ -348,7 +349,7 @@ static void draw_title_row ( struct setting_widget *widget ) {
348 349
 	clearmsg ( TITLE_ROW );
349 350
 	name = settings_name ( widget->settings );
350 351
 	attron ( A_BOLD );
351
-	msg ( TITLE_ROW, "iPXE configuration settings%s%s",
352
+	msg ( TITLE_ROW, PRODUCT_SHORT_NAME " configuration settings%s%s",
352 353
 	      ( name[0] ? " - " : "" ), name );
353 354
 	attroff ( A_BOLD );
354 355
 }

+ 5
- 3
src/usr/autoboot.c Dosyayı Görüntüle

@@ -42,6 +42,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
42 42
 #include <usr/prompt.h>
43 43
 #include <usr/autoboot.h>
44 44
 #include <config/general.h>
45
+#include <config/branding.h>
45 46
 
46 47
 /** @file
47 48
  *
@@ -522,7 +523,8 @@ static int shell_banner ( void ) {
522 523
 
523 524
 	/* Prompt user */
524 525
 	printf ( "\n" );
525
-	return ( prompt ( "Press Ctrl-B for the iPXE command line...",
526
+	return ( prompt ( "Press Ctrl-B for the " PRODUCT_SHORT_NAME
527
+			  " command line...",
526 528
 			  ( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ),
527 529
 			  CTRL_B ) == 0 );
528 530
 }
@@ -549,10 +551,10 @@ void ipxe ( struct net_device *netdev ) {
549 551
 	 * do so.
550 552
 	 *
551 553
 	 */
552
-	printf ( NORMAL "\n\n%s\n" BOLD "iPXE %s"
554
+	printf ( NORMAL "\n\n" PRODUCT_NAME "\n" BOLD PRODUCT_SHORT_NAME " %s"
553 555
 		 NORMAL " -- Open Source Network Boot Firmware -- "
554 556
 		 CYAN "http://ipxe.org" NORMAL "\n"
555
-		 "Features:", product_name, product_version );
557
+		 "Features:", product_version );
556 558
 	for_each_table_entry ( feature, FEATURES )
557 559
 		printf ( " %s", feature->name );
558 560
 	printf ( "\n" );

Loading…
İptal
Kaydet