Fix the odd anomaly that one can't bind help text to F11 and F12.
* Instead of the (non-existent) MAC, use the client identifier
for networks like Infiniband and Firewire/1394.
* Add a new INCLUDE command to the core syslinux parser.
+ * Allow binding help text to F11 and F12.
Changes in 3.36:
* MEMDISK: Disable EDD by default on floppy disks. EDD can be
HIGHMEM_MAX equ 037FFFFFFh ; DEFAULT highest address for an initrd
DEFAULT_BAUD equ 9600 ; Default baud rate for serial port
BAUD_DIVISOR equ 115200 ; Serial port parameter
+MAX_FKEYS equ 12 ; Number of F-key help files
%assign DO_WBINVD 0 ; Should we use WBINVD or not?
%if NULLFILE != 0
mov al,NULLFILE
mov di,FKeyName
- mov cx,10*(1 << FILENAME_MAX_LG2)
+ mov cx,MAX_FKEYS*(1 << FILENAME_MAX_LG2)
rep stosb
%endif
%endif
keyword f9, pc_fkey, FKeyN(9)
keyword f10, pc_fkey, FKeyN(10)
keyword f0, pc_fkey, FKeyN(10)
+ keyword f11, pc_fkey, FKeyN(11)
+ keyword f12, pc_fkey, FKeyN(12)
%if IS_PXELINUX
keyword ipappend, pc_ipappend
%endif
Ontimeout resb max_cmd_len+1 ; ontimeout
Onerror resb max_cmd_len+1 ; onerror
KbdMap resb 256 ; Keyboard map
-FKeyName resb 10*FILENAME_MAX ; File names for F-key help
+FKeyName resb MAX_FKEYS*FILENAME_MAX ; File names for F-key help
KernelCNameLen resw 1 ; Length of unmangled kernel name
InitRDCNameLen resw 1 ; Length of unmangled initrd name
%if IS_SYSLINUX
;
; Initialize screen (if we're using one)
;
- ; Now set up screen parameters
- call adjust_screen
-
- ; Wipe the F-key area
- mov al,NULLFILE
- mov di,FKeyName
- mov cx,10*(1 << FILENAME_MAX_LG2)
- push es ; Save ES -> PXE structure
- push ds ; ES <- DS
- pop es
- rep stosb
- pop es ; Restore ES
+%include "init.inc"
;
; Tell the user we got this far
;
; Common initialization code
;
-%include "init.inc"
%include "cpuinit.inc"
;
F2 filename
...etc...
F9 filename
-F0 filename
+F10 filename
+F11 filename
+F11 filename
Displays the indicated file on the screen when a function key is
pressed at the boot: prompt. This can be used to implement
pre-boot online help (presumably for the kernel command line
- options.) Note that F10 MUST be entered in the config file as
- "F0", not "F10", and that there is currently no way to bind
- file names to F11 and F12. Please see the section below on
- DISPLAY files.
+ options.) Please see the section below on DISPLAY files.
When using the serial console, press <Ctrl-F><digit> to get to
- the help screens, e.g. <Ctrl-F><2> to get to the F2 screen,
- and <Ctrl-F><0> for the F10 one.
+ the help screens, e.g. <Ctrl-F><2> to get to the F2 screen.
+ For F10-F12, hit <Ctrl-F><A>, <Ctrl-F>B, <Ctrl-F>C. For
+ compatiblity with earlier versions, F10 can also be entered as
+ <Ctrl-F>0.
Blank lines are ignored.
cmp di,command_line ; Space must not be first
je short get_char
enter_char: test byte [FuncFlag],1
- jz .not_ctrl_f
- mov byte [FuncFlag],0
- cmp al,'0'
- jb .not_ctrl_f
- je ctrl_f_0
- cmp al,'9'
- jbe ctrl_f
-.not_ctrl_f: cmp di,max_cmd_len+command_line ; Check there's space
+ je ctrl_f ; Keystroke after <Ctrl-F>
+ cmp di,max_cmd_len+command_line ; Check there's space
jnb short get_char
stosb ; Save it
call writechr ; Echo to screen
mov byte [FuncFlag],1
jmp short get_char_2
-ctrl_f_0: add al,10 ; <Ctrl-F>0 == F10
-ctrl_f: sub al,'1'
+ctrl_f:
xor ah,ah
- jmp short show_help
+ mov [FuncFlag],ah
+ cmp al,'0'
+ jb get_char_2
+ je .zero ; <Ctrl-F>0 = F10
+ or al,20h ; Lower case
+ cmp al,'9'
+ jna .digit
+ cmp al,'a' ; F10-F12 = <Ctrl-F>A, B, C
+ jb get_char_2
+ cmp al,'c'
+ ja get_char_2
+ sub al,'a'-10
+ jmp show_help
+.zero:
+ mov al,10
+ jmp show_help
+.digit:
+ sub al,'1'
+ jmp show_help
func_key:
; AL = 0 if we get here
xchg al,ah
cmp al,68 ; F10
- ja short get_char_2
+ ja .f11_f12
sub al,59 ; F1
- jb short get_char_2
-show_help: ; AX = func key # (0 = F1, 9 = F10)
+ jb get_char_2
+ jmp show_help
+.f11_f12:
+ cmp al,87 ; F11
+ jb get_char_2
+ cmp al,88 ; F12
+ ja get_char_2
+ sub al,87-10
+
+show_help: ; AX = func key # (0 = F1, 9 = F10, 11 = F12)
push di ; Save end-of-cmdline pointer
shl ax,FILENAME_MAX_LG2 ; Convert to pointer
add ax,FKeyName
mov si,command_line
call cwritestr ; Write command line so far
fk_nofile: pop di
- jmp short get_char_2
+ jmp get_char
;
; Show network info (in the form of the ipappend strings)