Quellcode durchsuchen

Print welcome banner in bold (which will come out as bright white text

on the BIOS console, or genuine bold font on a xterm "serial" console),
just to prove the concept of the ANSI escape sequence handling.
tags/v0.9.3
Michael Brown vor 17 Jahren
Ursprung
Commit
530bbf7cca
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 5
    2
      src/commandline/cmdline.c

+ 5
- 2
src/commandline/cmdline.c Datei anzeigen

@@ -3,6 +3,7 @@
3 3
 #include "cmdline.h"
4 4
 #include "cmdlinelib.h"
5 5
 #include "cmdlist.h"
6
+#include <gpxe/ansiesc.h>
6 7
 
7 8
 
8 9
 #define CMDL_DELAY (2000 * TICKS_PER_SEC) / 1000;
@@ -16,8 +17,10 @@ void cmdl_start()
16 17
 	//int spin;
17 18
 
18 19
 	//printf("gPXE %s (GPL) etherboot.org ...  ", VERSION);
19
-	printf("gPXE %s (GPL) etherboot.org\n", VERSION);
20
-	printf("Press Ctrl-B for gPXE command line...");
20
+	printf ( CSI "1m" /* bold */
21
+		 "gPXE " VERSION " (GPL) etherboot.org\n"
22
+		 CSI "0m" /* normal */
23
+		 "Press Ctrl-B for gPXE command line..." );
21 24
 
22 25
 	stop = currticks() + CMDL_DELAY;
23 26
 	

Laden…
Abbrechen
Speichern