* grub-core/loader/xnu.c (grub_cmd_xnu_kext): Abort if no kernel
is loaded (grub_cmd_xnu_kextdir): Likewise. (grub_cmd_xnu_splash): Likewise.
This commit is contained in:
parent
c76386454e
commit
693db2df56
2 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-12-27 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/loader/xnu.c (grub_cmd_xnu_kext): Abort if no kernel
|
||||
is loaded
|
||||
(grub_cmd_xnu_kextdir): Likewise.
|
||||
(grub_cmd_xnu_splash): Likewise.
|
||||
|
||||
2010-12-27 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Avoid using Reed-Solomon with 0 redundancy.
|
||||
|
|
|
@ -1198,6 +1198,10 @@ grub_cmd_xnu_kext (grub_command_t cmd __attribute__ ((unused)),
|
|||
int argc, char *args[])
|
||||
{
|
||||
grub_file_t binfile = 0;
|
||||
|
||||
if (! grub_xnu_heap_size)
|
||||
return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
|
||||
|
||||
if (argc == 2)
|
||||
{
|
||||
/* User explicitly specified plist and binary. */
|
||||
|
@ -1229,6 +1233,9 @@ grub_cmd_xnu_kextdir (grub_command_t cmd __attribute__ ((unused)),
|
|||
if (argc != 1 && argc != 2)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "directory name required");
|
||||
|
||||
if (! grub_xnu_heap_size)
|
||||
return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
|
||||
|
||||
if (argc == 1)
|
||||
return grub_xnu_scan_dir_for_kexts (args[0],
|
||||
"console,root,local-root,network-root",
|
||||
|
@ -1370,6 +1377,9 @@ grub_cmd_xnu_splash (grub_extcmd_context_t ctxt,
|
|||
if (argc != 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
|
||||
|
||||
if (! grub_xnu_heap_size)
|
||||
return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
|
||||
|
||||
if (ctxt->state[XNU_SPLASH_CMD_ARGINDEX_MODE].set &&
|
||||
grub_strcmp (ctxt->state[XNU_SPLASH_CMD_ARGINDEX_MODE].arg,
|
||||
"stretch") == 0)
|
||||
|
|
Loading…
Reference in a new issue