2010-11-30 Robert Millan <rmh@gnu.org>

* grub-core/loader/i386/bsd.c
	(grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module_elf): Check
	whether kernel is loaded using grub_loader_is_loaded(), rather
	than `kernel_type', which may still be `KERNEL_TYPE_NONE' under
	certain error conditions.
This commit is contained in:
Robert Millan 2010-11-30 19:33:12 +01:00
parent 725d286634
commit 3a4253b2c4
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2010-11-30 Robert Millan <rmh@gnu.org>
* grub-core/loader/i386/bsd.c
(grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module_elf): Check
whether kernel is loaded using grub_loader_is_loaded(), rather
than `kernel_type', which may still be `KERNEL_TYPE_NONE' under
certain error conditions.
2010-11-30 Robert Millan <rmh@gnu.org>
* grub-core/commands/echo.c: Include `<grub/term.h>'.

View file

@ -1611,7 +1611,7 @@ grub_cmd_freebsd_loadenv (grub_command_t cmd __attribute__ ((unused)),
char *buf = 0, *curr, *next;
int len;
if (kernel_type == KERNEL_TYPE_NONE)
if (! grub_loader_is_loaded ())
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"you need to load the kernel first");
@ -1844,7 +1844,7 @@ grub_cmd_freebsd_module_elf (grub_command_t cmd __attribute__ ((unused)),
grub_file_t file = 0;
grub_err_t err;
if (kernel_type == KERNEL_TYPE_NONE)
if (! grub_loader_is_loaded ())
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"you need to load the kernel first");