Hi all,

Attached is an extremely simple patch to support full line comments
(lines prefixed by a '#').  This was useful to me to have comments in
an embedded config file without the rescue parser complaining.  It might
be nice to have comments at the tail of commands, and I haven't tested
to see if this works with comments preceded by spaces.  Let me know if
there's a better way to handle this.

Glenn
=== modified file 'grub-core/kern/rescue_parser.c'
--- grub-core/kern/rescue_parser.c	2010-03-26 23:19:42 +0000
+++ grub-core/kern/rescue_parser.c	2011-11-05 01:15:31 +0000
@@ -52,8 +52,8 @@
   /* Get the command name.  */
   name = args[0];
 
-  /* If nothing is specified, restart.  */
-  if (*name == '\0')
+  /* If nothing is specified or a comment, restart.  */
+  if (*name == '\0' || *name == '#')
     goto quit;
 
   cmd = grub_command_find (name);

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to