mirror of
https://github.com/ipxe/ipxe
synced 2026-02-01 07:26:44 +03:00
[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>
This commit is contained in:
@@ -590,7 +590,8 @@ init_message:
|
|||||||
.ascii "\n"
|
.ascii "\n"
|
||||||
.ascii PRODUCT_NAME
|
.ascii PRODUCT_NAME
|
||||||
.ascii "\n"
|
.ascii "\n"
|
||||||
.asciz "iPXE (http://ipxe.org)"
|
.ascii PRODUCT_SHORT_NAME
|
||||||
|
.asciz " (http://ipxe.org)"
|
||||||
.size init_message, . - init_message
|
.size init_message, . - init_message
|
||||||
.ifeqs BUSTYPE, "PCIR"
|
.ifeqs BUSTYPE, "PCIR"
|
||||||
init_message_pci:
|
init_message_pci:
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||||||
#include <ipxe/command.h>
|
#include <ipxe/command.h>
|
||||||
#include <ipxe/parseopt.h>
|
#include <ipxe/parseopt.h>
|
||||||
#include <ipxe/shell.h>
|
#include <ipxe/shell.h>
|
||||||
|
#include <config/branding.h>
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
@@ -36,7 +37,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/** The shell prompt string */
|
/** The shell prompt string */
|
||||||
static const char shell_prompt[] = "iPXE> ";
|
static const char shell_prompt[] = PRODUCT_SHORT_NAME "> ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "help" command
|
* "help" command
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||||||
#include <ipxe/keys.h>
|
#include <ipxe/keys.h>
|
||||||
#include <ipxe/ansicol.h>
|
#include <ipxe/ansicol.h>
|
||||||
#include <ipxe/settings_ui.h>
|
#include <ipxe/settings_ui.h>
|
||||||
|
#include <config/branding.h>
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
@@ -348,7 +349,7 @@ static void draw_title_row ( struct setting_widget *widget ) {
|
|||||||
clearmsg ( TITLE_ROW );
|
clearmsg ( TITLE_ROW );
|
||||||
name = settings_name ( widget->settings );
|
name = settings_name ( widget->settings );
|
||||||
attron ( A_BOLD );
|
attron ( A_BOLD );
|
||||||
msg ( TITLE_ROW, "iPXE configuration settings%s%s",
|
msg ( TITLE_ROW, PRODUCT_SHORT_NAME " configuration settings%s%s",
|
||||||
( name[0] ? " - " : "" ), name );
|
( name[0] ? " - " : "" ), name );
|
||||||
attroff ( A_BOLD );
|
attroff ( A_BOLD );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||||||
#include <usr/prompt.h>
|
#include <usr/prompt.h>
|
||||||
#include <usr/autoboot.h>
|
#include <usr/autoboot.h>
|
||||||
#include <config/general.h>
|
#include <config/general.h>
|
||||||
|
#include <config/branding.h>
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
@@ -522,7 +523,8 @@ static int shell_banner ( void ) {
|
|||||||
|
|
||||||
/* Prompt user */
|
/* Prompt user */
|
||||||
printf ( "\n" );
|
printf ( "\n" );
|
||||||
return ( prompt ( "Press Ctrl-B for the iPXE command line...",
|
return ( prompt ( "Press Ctrl-B for the " PRODUCT_SHORT_NAME
|
||||||
|
" command line...",
|
||||||
( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ),
|
( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ),
|
||||||
CTRL_B ) == 0 );
|
CTRL_B ) == 0 );
|
||||||
}
|
}
|
||||||
@@ -549,10 +551,10 @@ void ipxe ( struct net_device *netdev ) {
|
|||||||
* do so.
|
* do so.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
printf ( NORMAL "\n\n%s\n" BOLD "iPXE %s"
|
printf ( NORMAL "\n\n" PRODUCT_NAME "\n" BOLD PRODUCT_SHORT_NAME " %s"
|
||||||
NORMAL " -- Open Source Network Boot Firmware -- "
|
NORMAL " -- Open Source Network Boot Firmware -- "
|
||||||
CYAN "http://ipxe.org" NORMAL "\n"
|
CYAN "http://ipxe.org" NORMAL "\n"
|
||||||
"Features:", product_name, product_version );
|
"Features:", product_version );
|
||||||
for_each_table_entry ( feature, FEATURES )
|
for_each_table_entry ( feature, FEATURES )
|
||||||
printf ( " %s", feature->name );
|
printf ( " %s", feature->name );
|
||||||
printf ( "\n" );
|
printf ( "\n" );
|
||||||
|
|||||||
Reference in New Issue
Block a user