[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix for echo command on unrecognized options
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH] Fix for echo command on unrecognized options |
Date: |
Wed, 25 Aug 2010 12:14:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100805 Icedove/3.0.6 |
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 <address@hidden>
> +
> + 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature