On 11.05.2013 18:35, Andrey Borzenkov wrote:
> + grub_size_t size = argc; /* +1 for final zero */
> + char *str, *p;
> + grub_err_t ret;
> +
> + if (argc == 0)
> + return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("missing arguments"));
> +
eval with no arguments returns success in bash, to match this behaviour,
it should be GRUB_ERR_NONE and no use of grub_error
> + for (i = 0; i < argc; i++)
> + size += grub_strlen (argv[i]);
> +
> + str = p = grub_malloc (size);
> + if (!str)
> + return grub_errno;
> +
> + for (i = 0; i < argc; i++)
> + {
> + grub_strcpy (p, argv[i]);
> + p += grub_strlen (argv[i]);
These 2 operations should be condensed by using grub_stpcpy
> + *p++ = ' ';
>- grub_script_execute_sourcecode (script, 0, dummy);
>+ grub_script_execute_sourcecode (script);
(in menu_entry.c) here you need a new scope for consistency.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
