* kern/dl.c (grub_dl_load): Don't abort if prefix is not set,

just return an error.
This commit is contained in:
proski 2008-01-26 20:34:58 +00:00
parent 22da1f6f0f
commit 2033f53e0a
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-01-26 Pavel Roskin <proski@gnu.org>
* kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
just return an error.
2008-01-26 Bean <bean123ch@gmail.com>
* fs/reiserfs.c (grub_fshelp_node): New member next_offset.

View File

@ -625,8 +625,10 @@ grub_dl_load (const char *name)
if (mod)
return mod;
if (! grub_dl_dir)
grub_fatal ("module dir is not initialized yet");
if (! grub_dl_dir) {
grub_error (GRUB_ERR_FILE_NOT_FOUND, "\"prefix\" is not set");
return 0;
}
filename = (char *) grub_malloc (grub_strlen (grub_dl_dir) + 1
+ grub_strlen (name) + 4 + 1);