#include <grub/command.h>
#include <grub/i18n.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+
static grub_dl_t my_mod;
static grub_efi_physical_address_t address;
grub_free (file_path);
grub_free (cmdline);
cmdline = 0;
+ file_path = 0;
grub_dl_unref (my_mod);
return GRUB_ERR_NONE;
grub_efi_boot_services_t *b;
grub_efi_status_t status;
grub_efi_uintn_t exit_data_size;
- grub_efi_char16_t *exit_data;
+ grub_efi_char16_t *exit_data = NULL;
b = grub_efi_system_table->boot_services;
status = efi_call_3 (b->start_image, image_handle, &exit_data_size, &exit_data);
if (exit_data)
efi_call_1 (b->free_pool, exit_data);
- grub_chainloader_unload ();
+ grub_loader_unset ();
return grub_errno;
}
grub_efi_print_device_path (file_path);
size = grub_file_size (file);
+ if (!size)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "file is empty");
+ goto fail;
+ }
pages = (((grub_efi_uintn_t) size + ((1 << 12) - 1)) >> 12);
status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ANY_PAGES,