From: <bob...@us...> - 2007-07-16 13:36:32
|
Revision: 1162 http://svn.sourceforge.net/hackndev/?rev=1162&view=rev Author: bobofdoom Date: 2007-07-16 06:36:17 -0700 (Mon, 16 Jul 2007) Log Message: ----------- Cocoboot: Fixed skipping of blank lines and comments in cocoboot.conf. Modified Paths: -------------- cocoboot/trunk/cocoboot.conf.example cocoboot/trunk/m68k/options.c Modified: cocoboot/trunk/cocoboot.conf.example =================================================================== --- cocoboot/trunk/cocoboot.conf.example 2007-07-16 13:08:24 UTC (rev 1161) +++ cocoboot/trunk/cocoboot.conf.example 2007-07-16 13:36:17 UTC (rev 1162) @@ -1,4 +1,4 @@ -# cocoboot.conf.exaple - example configuration file for Cocboot +# cocoboot.conf.exaple - example configuration file for Cocoboot ## cmdline # The value of cmdline is the default kernel command-line. The user can Modified: cocoboot/trunk/m68k/options.c =================================================================== --- cocoboot/trunk/m68k/options.c 2007-07-16 13:08:24 UTC (rev 1161) +++ cocoboot/trunk/m68k/options.c 2007-07-16 13:36:17 UTC (rev 1162) @@ -85,6 +85,7 @@ { char *p = line; char *key, *value; + char buf[128]; *out_key = *out_value = NULL; @@ -94,7 +95,6 @@ key++; if (!*key || *key == '#') return NULL; /* error: empty line or comment */ - /* divide key and value into seperate strings */ while (*p && *p != '=') p++; if (!*p) return "no equals sign found"; @@ -170,7 +170,6 @@ UInt16 vol; UInt32 size; FileRef f; - char buf[2048]; int line_no; char *errmsg, *key, *value; @@ -193,6 +192,8 @@ continue; } + if (!key) continue; /* blank line or comment */ + if (set_option(key, value) < 0) { show_parse_error("unrecognised option", line_no); continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |