keyword text, pc_text
keyword include, pc_opencmd, pc_include
keyword append, pc_append
+ keyword initrd, pc_filename, InitRD
keyword default, pc_default
keyword display, pc_opencmd, get_msg_file
keyword font, pc_filecmd, loadfont
keyword onerror, pc_onerror
keyword allowoptions, pc_setint16, AllowOptions
keyword noescape, pc_setint16, NoEscape
- keyword f1, pc_fkey, FKeyN(1)
- keyword f2, pc_fkey, FKeyN(2)
- keyword f3, pc_fkey, FKeyN(3)
- keyword f4, pc_fkey, FKeyN(4)
- keyword f5, pc_fkey, FKeyN(5)
- keyword f6, pc_fkey, FKeyN(6)
- keyword f7, pc_fkey, FKeyN(7)
- keyword f8, pc_fkey, FKeyN(8)
- 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)
+ keyword f1, pc_filename, FKeyN(1)
+ keyword f2, pc_filename, FKeyN(2)
+ keyword f3, pc_filename, FKeyN(3)
+ keyword f4, pc_filename, FKeyN(4)
+ keyword f5, pc_filename, FKeyN(5)
+ keyword f6, pc_filename, FKeyN(6)
+ keyword f7, pc_filename, FKeyN(7)
+ keyword f8, pc_filename, FKeyN(8)
+ keyword f9, pc_filename, FKeyN(9)
+ keyword f10, pc_filename, FKeyN(10)
+ keyword f0, pc_filename, FKeyN(10)
+ keyword f11, pc_filename, FKeyN(11)
+ keyword f12, pc_filename, FKeyN(12)
%if IS_PXELINUX
keyword ipappend, pc_ipappend
%endif
ret
;
-; "F"-key command
+; Store mangled filename command
;
-pc_fkey: push ax
+pc_filename: push ax
call pc_getline
pop di
call mangle_name ; Mangle file name
; "label" command
;
pc_label: call commit_vk ; Commit any current vkernel
+ mov byte [InitRD+NULLOFFSET],NULLFILE ; No "initrd" statement
mov di,VKernelBuf ; Erase the vkernelbuf for better compression
mov cx,(vk_size >> 1)
xor ax,ax
; commit_vk: Store the current VKernelBuf into buffer segment
;
commit_vk:
- ; For better compression, clean up the append field
- mov ax,[VKernelBuf+vk_appendlen]
+ cmp byte [VKernel],0
+ jz .nolabel ; Nothing to commit...
+
mov di,VKernelBuf+vk_append
- add di,ax
+ add di,[VKernelBuf+vk_appendlen]
+
+ ; If we have an initrd statement, append it to the
+ ; append statement
+ cmp byte [InitRD+NULLOFFSET],NULLFILE
+ je .noinitrd
+
+ mov si,initrd_cmd
+ mov cx,initrd_cmd_len
+ rep movsb
+ mov si,InitRD
+ call unmangle_name
+ mov al,' '
+ stosb
+
+ ; For better compression, clean up the append field
+.noinitrd:
+ mov ax,di
+ sub ax,VKernelBuf+vk_append
+ mov [VKernelBuf+vk_appendlen],ax
mov cx,max_cmd_len+1
sub cx,ax
xor ax,ax
mov cx,vk_size
call rllpack
mov [VKernelEnd],edi
+.nolabel:
ret
.overflow:
mov si,vk_overflow_msg