diff options
author | hpa <hpa> | 2004-12-17 06:58:24 +0000 |
---|---|---|
committer | hpa <hpa> | 2004-12-17 06:58:24 +0000 |
commit | 77d1a2bf58ba666cc053fe3fa7fc06d440a11938 (patch) | |
tree | db908d88bb78ae728b2c5fdf9a55d40a6a8f43c1 /parseconfig.inc | |
parent | 1ad9233d7287c8e98bda8774a6eafd2a3e988b89 (diff) | |
download | syslinux-77d1a2bf58ba666cc053fe3fa7fc06d440a11938.tar.gz |
Make sure unused parts of the VKernelBuf are zero-filled; this will
be important for RLL compression.
Diffstat (limited to 'parseconfig.inc')
-rw-r--r-- | parseconfig.inc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/parseconfig.inc b/parseconfig.inc index 1f6ebc63..3b6d111b 100644 --- a/parseconfig.inc +++ b/parseconfig.inc @@ -86,7 +86,10 @@ pc_ipappend: call getint pc_localboot: call getint cmp word [VKernelCtr],byte 0 ; ("label" section only) je .err - mov [VKernelBuf+vk_rname], byte 0 ; Null kernel name + mov di,VKernelBuf+vk_rname + xor ax,ax + mov cx,FILENAME_MAX + rep stosb ; Null kernel name mov [VKernelBuf+vk_rname+1], bx ; Return type .err: ret %endif @@ -236,6 +239,10 @@ pc_fkey: push ax ; "label" command ; pc_label: call commit_vk ; Commit any current vkernel + mov di,VKernelBuf ; Erase the vkernelbuf for better compression + mov cx,vk_size >> 1 + xor ax,ax + rep stosw call pc_getline mov di,VKernelBuf+vk_vname call mangle_name ; Mangle virtual name @@ -292,6 +299,15 @@ 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] + mov di,VKernelBuf+vk_append + add di,ax + mov cx,max_cmd_len+1 + sub cx,ax + xor ax,ax + rep stosb + cmp word [VKernelCtr],byte 0 je cvk_ret ; No VKernel = return cmp word [VKernelCtr],max_vk ; Above limit? |