From 1b3bc4ee47b57799be24fe3e75028bdfbb1d0c86 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 9 May 2007 18:31:23 -0700 Subject: PXELINUX: Add to print the network information Pressing at the boot prompt will output the ipappend strings. --- NEWS | 2 ++ ui.inc | 28 +++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 16520ff5..2daecea6 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ Changes in 3.50: 65535*sectors. * vesamenu: fix decoding of palettized PNG images. * Update the Linux kernel boot protocol. + * PXELINUX: Press Ctrl-N at the boot prompt to read out the + network info. Changes in 3.36: * MEMDISK: Disable EDD by default on floppy disks. EDD can be diff --git a/ui.inc b/ui.inc index 400c2d6e..f8f95fd3 100644 --- a/ui.inc +++ b/ui.inc @@ -89,6 +89,10 @@ not_ascii: mov byte [FuncFlag],0 je command_done cmp al,'F' & 1Fh ; je set_func_flag +%if IS_PXELINUX + cmp al,'N' & 1Fh ; + je show_network_info +%endif cmp al,'U' & 1Fh ; je kill_command ; Kill input line cmp al,'V' & 1Fh ; @@ -102,7 +106,8 @@ backspace: cmp di,command_line ; Make sure there is anything dec di ; Unstore one character mov si,wipe_char ; and erase it from the screen call cwritestr - jmp short get_char_2 +get_char_2: + jmp short get_char kill_command: call crlf @@ -114,8 +119,7 @@ force_text_mode: set_func_flag: mov byte [FuncFlag],1 -get_char_2: - jmp short get_char + jmp short get_char_2 ctrl_f_0: add al,10 ; 0 == F10 ctrl_f: sub al,'1' @@ -172,6 +176,24 @@ fk_wrcmd: fk_nofile: pop di jmp short get_char_2 +; +; Show network info (in the form of the ipappend strings) +; +%if IS_PXELINUX +show_network_info: + mov si,IPAppends ; See comboot.doc + mov cx,numIPAppends +.loop: + lodsw + push si + mov si,ax + call cwritestr + call crlf + pop si + loop .loop + jmp fk_wrcmd +%endif + ; ; Jump here to run the default command line ; -- cgit v1.2.1