From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org
Subject: [PATCH] Add comments to rescue parser
Date: Sun, 6 Nov 2011 01:17:58 -0500 [thread overview]
Message-ID: <4eb62699.2015640a.1e6f.79c7@mx.google.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
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
[-- Attachment #2: grub.rescue_parser_comments.patch --]
[-- Type: text/x-patch, Size: 459 bytes --]
=== 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);
reply other threads:[~2011-11-06 6:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4eb62699.2015640a.1e6f.79c7@mx.google.com \
--to=development@efficientek.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).