Ram Yalamanchili
2007-Feb-23 04:52 UTC
[syslinux] Patch: Readconfig wont parse certain options anymore
com32/modules/readconfig.c: This is a side effect of is_kernel_type() overwrite the current pointer in a loop context. Hence subsequent options aren't parsed ever. This is particularily visible, if you use timeout option, which wont work in the latest 3.40-pre7. Patch: --- com32/modules/readconfig.c /opensource/syslinux-3.40-pre7/com32/modules/readconfig.c#2 +++ com32/modules/readconfig.c 07-02-22 20:45:46 @@ -412,7 +412,7 @@ static void parse_config_file(FILE *f) { - char line[MAX_LINE], *p, *ep, ch; + char line[MAX_LINE], *p, *kp, *ep, ch; enum kernel_type type; while ( fgets(line, sizeof line, f) ) { @@ -532,10 +532,10 @@ ld.menulabel = NULL; ld.ipappend = ipappend; ld.menudefault = ld.menuhide = 0; - } else if ( (p = is_kernel_type(p, &type)) ) { + } else if ( (kp = is_kernel_type(p, &type)) ) { if ( ld.label ) { free(ld.kernel); - ld.kernel = strdup(skipspace(p)); + ld.kernel = strdup(skipspace(kp)); ld.type = type; } } else if ( looking_at(p, "timeout") ) {
H. Peter Anvin
2007-Feb-24 00:38 UTC
[syslinux] Patch: Readconfig wont parse certain options anymore
Ram Yalamanchili wrote:> com32/modules/readconfig.c: This is a side effect of is_kernel_type() > overwrite the current pointer in a loop context. Hence subsequent > options aren't parsed ever. > > This is particularily visible, if you use timeout option, which wont > work in the latest 3.40-pre7.Fixed in git. I didn't use your patch, simply because this is what the variable "ep" is used for elsewhere, and no reason to introduce a new name. Thanks for the report & debugging! -hpa
Maybe Matching Threads
- [PATCH] core: Add support for BLS Type 1 entries
- [RFC PATCH] menu: support single key booting
- [PATCH] (vesa)menu.c32: Add support for BLS
- [PATCH] (vesa)menu.c32: Add support for BLS
- Fwd: [PATCH] {vesa}menu.c32 feature => hide menu entry for specific sources