diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-07-03 18:45:42 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-03 18:45:42 -0700 |
commit | 09dcba81bb7220e929093913bbfcb2c47e0ed4fb (patch) | |
tree | 509fa3f1f5b55f7e7ee5f6f7b50fa2ea8ae3720d /core/parseconfig.inc | |
parent | 9de789906be3d913a89189c15ba4eff40f37022f (diff) | |
download | syslinux-09dcba81bb7220e929093913bbfcb2c47e0ed4fb.tar.gz |
Allow the initrd to be specified on a separate linesyslinux-3.71-pre4
Allow the initrd to be specified on a separate line from command-line
options (append). This apparently can help certain tools.
Diffstat (limited to 'core/parseconfig.inc')
-rw-r--r-- | core/parseconfig.inc | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/core/parseconfig.inc b/core/parseconfig.inc index 2ef9c3a2..e004cab5 100644 --- a/core/parseconfig.inc +++ b/core/parseconfig.inc @@ -289,9 +289,9 @@ pc_serial: call getint 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 @@ -301,6 +301,7 @@ pc_fkey: push ax ; "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 @@ -392,10 +393,30 @@ parse_config: ; 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 @@ -407,6 +428,7 @@ commit_vk: mov cx,vk_size call rllpack mov [VKernelEnd],edi +.nolabel: ret .overflow: mov si,vk_overflow_msg |