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.gro...@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
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel