From: Shreenidhi Shedi <yesshedi@gmail.com>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: grub-devel@gnu.org, alexey.makhalov@broadcom.com,
daniel.kiper@oracle.com,
Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
Subject: Re: [PATCH v1 1/2] envblk: ignore empty new lines while parsing env files
Date: Mon, 19 May 2025 23:50:27 +0530 [thread overview]
Message-ID: <37a231a3-5082-40c1-9f38-9b8b663f9321@gmail.com> (raw)
In-Reply-To: <20250519171345.jbl5r65uabinse67@tomti.i.net-space.pl>
On 19/05/25 22:43, Daniel Kiper wrote:
> On Sun, May 18, 2025 at 01:21:20PM +0530, Shreenidhi Shedi wrote:
>> From: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
>>
>> Environment files may contain empty lines, which should be
>> ignored during parsing. Currently, these lines are not skipped and
>> resulting in incorrect behavior. This patch adds a check to skip empty
>> lines along with those starting with `#'.
>>
>> Signed-off-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
>> Reviewed-by: Alexey Makhalov <alexey.makhalov@broadcom.com>
>
> Please do not add RBs if reviews have not been done in public.
> Those given on the grub-devel counts only.
>
>> ---
>> grub-core/lib/envblk.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/grub-core/lib/envblk.c b/grub-core/lib/envblk.c
>> index 2e4e78b13..f08dabaad 100644
>> --- a/grub-core/lib/envblk.c
>> +++ b/grub-core/lib/envblk.c
>> @@ -235,7 +235,7 @@ grub_envblk_iterate (grub_envblk_t envblk,
>>
>> while (p < pend)
>> {
>> - if (*p != '#')
>> + if (*p != '#' && *p != '\n')
>
> Why do not add '\r' too?
>
> Daniel
On suggestion regarding RBs, will keep it in mind going forward.
I will add check to ignore '\r' and send v2 shortly.
Thanks for the review.
--
Shedi
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2025-05-19 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-18 7:51 [PATCH v1 0/2] Fix cfg file parsing and command line parsing Shreenidhi Shedi
2025-05-18 7:51 ` [PATCH v1 1/2] envblk: ignore empty new lines while parsing env files Shreenidhi Shedi
2025-05-19 17:13 ` Daniel Kiper
2025-05-19 17:25 ` Alexey Makhalov via Grub-devel
2025-05-19 18:20 ` Shreenidhi Shedi [this message]
2025-05-19 18:17 ` Vladimir 'phcoder' Serbinenko
2025-05-18 7:51 ` [PATCH v1 2/2] cmdline: fix command line parsing in grub Shreenidhi Shedi
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=37a231a3-5082-40c1-9f38-9b8b663f9321@gmail.com \
--to=yesshedi@gmail.com \
--cc=alexey.makhalov@broadcom.com \
--cc=daniel.kiper@oracle.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
--cc=shreenidhi.shedi@broadcom.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.