2009-09-08 Colin Watson <cjwatson@ubuntu.com>

* script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
	unknown-command case.  Fixes bug #27320.
This commit is contained in:
cjwatson 2009-09-08 19:10:34 +00:00
parent 44454e4c24
commit 99423078e4
2 changed files with 9 additions and 0 deletions

View file

@ -122,6 +122,10 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
grub_errno = GRUB_ERR_NONE;
}
grub_free (assign);
grub_sprintf (errnobuf, "%d", grub_errno);
grub_env_set ("?", errnobuf);
return 0;
}
}