From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Fix for echo command on unrecognized options
Date: Wed, 25 Aug 2010 12:14:28 +0200 [thread overview]
Message-ID: <4C74ED04.9010803@gmail.com> (raw)
In-Reply-To: <AANLkTikW7coGtgpVr+GeWH3arJ1qkutqPDrXM3OXcMqB@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]
On 08/25/2010 06:35 AM, BVK Chaitanya wrote:
> Hi,
>
>
> Attached patch fixes echo command behavior for unrecognized options.
> On BASH echo command passes all unrecognized options to the output,
> this patch makes GRUB version to behave similarly. This bug has been
> reported by Yves Blusseau (JrCs).
>
>
This patch parses options manually but still fails to replicate the
'echo' behaviour.
1) echo erere -n outputs "erere -n"
2) We can still use extcmd, it just needs minor modifications to accept
flags GRUB_COMMAND_FLAG_ACCEPT_DASHARG (put -x and --xyz into args[])
and GRUB_COMMAND_FLAG_BSD_STYLE (options precede arguments). As an
advantage the options are still listed in help and it may be useful for
other things as well (e.g. pending nounzip patch)
> --- ChangeLog 2010-08-23 17:56:24 +0000
> +++ ChangeLog 2010-08-25 04:19:18 +0000
> @@ -1,3 +1,14 @@
> +2010-08-25 BVK Chaitanya <bvk.groups@gmail.com>
> +
> + Fix echo command output for unrecognized options (bug reported by
> + Yves Blusseau)
> +
> + * tests/grub_cmd_echo.in: New testcase.
> + * Makefile.util.def: Rules for new testcase.
> +
> + * grub-core/commands/echo.c: Use custom option parsing instead of
> + extcmd framework.
> +
>
>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
next prev parent reply other threads:[~2010-08-25 10:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-25 4:35 [PATCH] Fix for echo command on unrecognized options BVK Chaitanya
2010-08-25 10:14 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-08-25 11:16 ` BVK Chaitanya
2010-08-25 12:47 ` Vladimir 'φ-coder/phcoder' Serbinenko
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=4C74ED04.9010803@gmail.com \
--to=phcoder@gmail.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 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.