apply to that specific program only; other changes apply to all of
them.
+Changes in 2.08:
+ * Add "timeoutcmd" to allow timeout to have a different action
+ than just pressing Enter.
+
Changes in 2.07:
* MEMDISK: Workaround for BIOSes which go into a snit when
they get a RESET command for the floppy system when there is
VKernelBuf: resb vk_size ; "Current" vkernel
alignb 4
AppendBuf resb max_cmd_len+1 ; append=
+TimeOutCmd resb max_cmd_len+1 ; timeoutcmd
KbdMap resb 256 ; Keyboard map
FKeyName resb 10*FILENAME_MAX ; File names for F-key help
NumBuf resb 15 ; Buffer to load number
; Misc initialized (data) variables
;
AppendLen dw 0 ; Bytes in append= command
+TimeOutCmdLen dw 0 ; Bytes in timeoutcmd command
KbdTimeOut dw 0 ; Keyboard timeout (if any)
CmdLinePtr dw cmd_line_here ; Command line advancing pointer
initrd_flag equ $
ForcePrompt dw 0 ; Force prompt
AllowImplicit dw 1 ; Allow implicit kernels
SerialPort dw 0 ; Serial port base (or 0 for no serial port)
-NextSocket dw 49152 ; Counter for allocating socket numbers
VGAFontSize dw 16 ; Defaults to 16 byte font
UserFont db 0 ; Using a user-specified font
ScrollAttribute db 07h ; White on black (for text mode)
say
serial
timeout
+timeoutcmd
f0
f1
f2
keyword say, pc_say
keyword serial, pc_serial
keyword timeout, pc_timeout
+ keyword timeoutcmd, pc_timeoutcmd
keyword f1, pc_fkey, FKeyName+(0<<FILENAME_MAX_LG2)
keyword f2, pc_fkey, FKeyName+(1<<FILENAME_MAX_LG2)
keyword f3, pc_fkey, FKeyName+(2<<FILENAME_MAX_LG2)
VKernelBuf: resb vk_size ; "Current" vkernel
alignb 4
AppendBuf resb max_cmd_len+1 ; append=
+TimeOutCmd resb max_cmd_len+1 ; timeoutcmd
KbdMap resb 256 ; Keyboard map
FKeyName resb 10*16 ; File names for F-key help
NumBuf resb 15 ; Buffer to load number
debug_magic dw 0D00Dh ; Debug code sentinel
%endif
AppendLen dw 0 ; Bytes in append= command
+TimeOutCmdLen dw 0 ; Bytes in timeoutcmd command
KbdTimeOut dw 0 ; Keyboard timeout (if any)
CmdLinePtr dw cmd_line_here ; Command line advancing pointer
initrd_flag equ $
ret
;
+; "timeoutcmd" command
+;
+pc_timeoutcmd: mov di,TimeOutCmd
+ call getline
+ sub di,TimeOutCmd
+ mov [TimeOutCmdLen],di
+ ret
+
+;
; "append" command
;
pc_append: cmp word [VKernelCtr],byte 0
VKernelBuf: resb vk_size ; "Current" vkernel
alignb 4
AppendBuf resb max_cmd_len+1 ; append=
+TimeOutCmd resb max_cmd_len+1 ; timeoutcmd
KbdMap resb 256 ; Keyboard map
BootFile resb 256 ; Boot file from DHCP packet
PathPrefix resb 256 ; Path prefix derived from the above
BaseStack dd StackBuf ; SS:ESP of base stack
dw 0
AppendLen dw 0 ; Bytes in append= command
+TimeOutCmdLen dw 0 ; Bytes in timeoutcmd command
KbdTimeOut dw 0 ; Keyboard timeout (if any)
CmdLinePtr dw cmd_line_here ; Command line advancing pointer
initrd_flag equ $
ForcePrompt dw 0 ; Force prompt
AllowImplicit dw 1 ; Allow implicit kernels
SerialPort dw 0 ; Serial port base (or 0 for no serial port)
-NextSocket dw 49152 ; Counter for allocating socket numbers
VGAFontSize dw 16 ; Defaults to 16 byte font
UserFont db 0 ; Using a user-specified font
ScrollAttribute db 07h ; White on black (for text mode)
+
+;
+; PXELINUX-specific variables
+;
+NextSocket dw 49152 ; Counter for allocating socket numbers
KeepPXE db 0 ; Should PXE be kept around?
;
NOTE: The maximum possible timeout value is 35996; corresponding to
just below one hour.
+TIMEOUTCMD kernel options...
+ Sets the command line invoked on a timeout. Normally this is
+ the same thing as invoked by "DEFAULT". If this is specified,
+ then "DEFAULT" is used only if the user presses <Enter> to
+ boot.
+
SERIAL port [[baudrate] flowcontrol]
Enables a serial port to act as the console. "port" is a
number (0 = /dev/ttyS0 = COM1, etc.) or an I/O port address
je tick_loop
pop cx
loop time_loop ; If so, decrement counter
+
+ ; Timeout!!!!
call vgahidecursor
- jmp command_done ; Timeout!
+ mov si,TimeOutCmd ; Copy timeoutcommand if we have one...
+ mov cx,TimeOutCmdLen
+ rep movsb
+.stddefault:
+ jmp command_done
get_char_pop: pop eax ; Clear stack
get_char: