diff options
author | hpa <hpa> | 2003-02-25 00:52:20 +0000 |
---|---|---|
committer | hpa <hpa> | 2003-02-25 00:52:20 +0000 |
commit | af428784d8226d967809736eb2e2fd9099f1b2d5 (patch) | |
tree | 1d346ab2b49d7279e81d8d7abf5b7d407e6a2192 | |
parent | 7c2884271d2c536f78d7a447eafd544b3378bf25 (diff) | |
download | syslinux-af428784d8226d967809736eb2e2fd9099f1b2d5.tar.gz |
Actually support comment lines.
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | genhash.pl | 5 | ||||
-rw-r--r-- | keywords | 1 | ||||
-rw-r--r-- | keywords.inc | 1 | ||||
-rw-r--r-- | parseconfig.inc | 37 | ||||
-rw-r--r-- | syslinux.doc | 5 |
6 files changed, 30 insertions, 22 deletions
@@ -2,6 +2,9 @@ Starting with 1.47, changes marked with SYSLINUX/PXELINUX/ISOLINUX apply to that specific program only; other changes apply to all of them. +Changes in 2.03: + * Actually support comment lines in the configuration file. + Changes in 2.02: * SYSLINUX: Security flaws have been found in the SYSLINUX installer when running setuid root. Rewrite the SYSLINUX @@ -5,6 +5,9 @@ while ( defined($keywd = <STDIN>) ) { chomp $keywd; + + ($keywd,$keywdname) = split(/\s+/, $keywd); + $keywdname = $keywd unless ( $keywdname ); $l = length($keywd); $h = 0; @@ -17,5 +20,5 @@ while ( defined($keywd = <STDIN>) ) { $h, $keywd, $seenhash{$h}; } $seenhash{$h} = $keywd; - printf("%-23s equ 0x%08x\n", "hash_\L${keywd}\E", $h); + printf("%-23s equ 0x%08x\n", "hash_${keywdname}", $h); } @@ -1,3 +1,4 @@ +# hash append default display diff --git a/keywords.inc b/keywords.inc index 10255431..b1dacfdc 100644 --- a/keywords.inc +++ b/keywords.inc @@ -44,6 +44,7 @@ keywd_size equ 8 ; Bytes per keyword align 4, db 0 keywd_table: + keyword hash, pc_comment keyword append, pc_append keyword default, pc_default keyword display, pc_filecmd, get_msg_file diff --git a/parseconfig.inc b/parseconfig.inc index 96c52b46..b24d924a 100644 --- a/parseconfig.inc +++ b/parseconfig.inc @@ -79,10 +79,7 @@ pc_localboot: call getint ; "kernel" command pc_kernel: cmp word [VKernelCtr],byte 0 je .err ; ("label" section only) - mov di,trackbuf - push di - call getline - pop si + call pc_getline mov di,VKernelBuf+vk_rname call mangle_name .err: ret @@ -115,10 +112,7 @@ pc_setint16: ; "display", "font", "kbdmap" ; pc_filecmd: push ax ; Function to tailcall - mov di,trackbuf - push di - call getline - pop si + call pc_getline mov di,MNameBuf push di call mangle_name @@ -217,10 +211,7 @@ pc_serial: call getint ; "F"-key command ; pc_fkey: push ax - mov di,trackbuf - push di - call getline ; Get filename to display - pop si + call pc_getline pop di call mangle_name ; Mangle file name ret @@ -229,10 +220,7 @@ pc_fkey: push ax ; "label" command ; pc_label: call commit_vk ; Commit any current vkernel - mov di,trackbuf ; Get virtual filename - push di - call getline - pop si + call pc_getline mov di,VKernelBuf+vk_vname call mangle_name ; Mangle virtual name inc word [VKernelCtr] ; One more vkernel @@ -254,14 +242,25 @@ pc_label: call commit_vk ; Commit any current vkernel ; ; "say" command ; -pc_say: mov di,trackbuf ; "say" command +pc_say: call pc_getline ; "say" command + call writestr + jmp crlf ; tailcall + +; +; Comment line +; +pc_comment equ pc_getline ; Get a line and discard + +; +; Common subroutine: load line into trackbuf; returns with SI -> trackbuf +; +pc_getline: mov di,trackbuf push di call getline xor al,al stosb ; Null-terminate pop si - call writestr - jmp crlf ; tailcall + ret ; ; Main loop for configuration file parsing diff --git a/syslinux.doc b/syslinux.doc index ae5903b8..d6e579b3 100644 --- a/syslinux.doc +++ b/syslinux.doc @@ -99,6 +99,8 @@ All options here applies to PXELINUX as well as SYSLINUX unless otherwise noted. See pxelinux.doc for additional information on PXELINUX. +# comment + A comment line. The whitespace after the hash mark is mandatory. DEFAULT kernel options... Sets the default command line. If SYSLINUX boots automatically, @@ -291,8 +293,7 @@ F0 filename the help screens, e.g. <Ctrl-F><2> to get to the F2 screen, and <Ctrl-F><0> for the F10 one. -In the configuration file blank lines and comment lines beginning -with a hash mark (#) are ignored. +Blank lines are ignored. Note that the configuration file is not completely decoded. Syntax different from the one described above may still work correctly in this |