merge with mainline
This commit is contained in:
commit
ee14ec9935
27 changed files with 1004 additions and 396 deletions
|
@ -59,6 +59,23 @@ grub_script_argv_free (struct grub_script_argv *argv)
|
|||
argv->script = 0;
|
||||
}
|
||||
|
||||
/* Make argv from argc, args pair. */
|
||||
int
|
||||
grub_script_argv_make (struct grub_script_argv *argv, int argc, char **args)
|
||||
{
|
||||
int i;
|
||||
struct grub_script_argv r = { 0, 0, 0 };
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
if (grub_script_argv_next (&r) || grub_script_argv_append (&r, args[i]))
|
||||
{
|
||||
grub_script_argv_free (&r);
|
||||
return 1;
|
||||
}
|
||||
*argv = r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Prepare for next argc. */
|
||||
int
|
||||
grub_script_argv_next (struct grub_script_argv *argv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue