Allowed zero-cost enforced ordering of features in startup banner

list.

Added FEATURE() macros to most relevant (non-driver) files.
This commit is contained in:
Michael Brown
2007-08-02 14:51:03 +01:00
parent 67afe84292
commit 9fd6a0418f
13 changed files with 80 additions and 40 deletions

View File

@@ -34,8 +34,8 @@
#define BOLD "\033[1m"
#define CYAN "\033[36m"
static char * features[0] __table_start ( char *, features );
static char * features_end[0] __table_end ( char *, features );
static struct feature features[0] __table_start ( struct feature, features );
static struct feature features_end[0] __table_end ( struct feature, features );
/**
* Print shell banner and prompt for shell entry
@@ -44,7 +44,7 @@ static char * features_end[0] __table_end ( char *, features );
*/
int shell_banner ( void ) {
unsigned long timeout = ( currticks() + BANNER_TIMEOUT );
char **feature;
struct feature *feature;
int key;
int enter_shell = 0;
@@ -54,7 +54,7 @@ int shell_banner ( void ) {
CYAN "http://etherboot.org" NORMAL "\n"
"Features:" );
for ( feature = features ; feature < features_end ; feature++ ) {
printf ( " %s", *feature );
printf ( " %s", feature->name );
}
printf ( "\nPress Ctrl-B for the gPXE command line..." );