Fix inconsistent grub_efiemu_finish_boot_services return type

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-13 14:42:22 +02:00
parent f948a3ffab
commit 65ce0931d0
2 changed files with 28 additions and 1 deletions

View file

@ -323,6 +323,25 @@ grub_efiemu_get_memory_map (grub_efi_uintn_t *memory_map_size,
return 1;
}
grub_err_t
grub_efiemu_finish_boot_services (grub_efi_uintn_t *memory_map_size,
grub_efi_memory_descriptor_t *memory_map,
grub_efi_uintn_t *map_key,
grub_efi_uintn_t *descriptor_size,
grub_efi_uint32_t *descriptor_version)
{
int val = grub_efiemu_get_memory_map (memory_map_size,
memory_map, map_key,
descriptor_size,
descriptor_version);
if (val == 1)
return GRUB_ERR_NONE;
if (val == -1)
return grub_errno;
return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
}
/* Free everything */
grub_err_t
grub_efiemu_mm_unload (void)

View file

@ -217,7 +217,15 @@ int grub_efiemu_get_memory_map (grub_efi_uintn_t *memory_map_size,
grub_efi_uintn_t *map_key,
grub_efi_uintn_t *descriptor_size,
grub_efi_uint32_t *descriptor_version);
#define grub_efiemu_finish_boot_services grub_efiemu_get_memory_map
grub_err_t
grub_efiemu_finish_boot_services (grub_efi_uintn_t *memory_map_size,
grub_efi_memory_descriptor_t *memory_map,
grub_efi_uintn_t *map_key,
grub_efi_uintn_t *descriptor_size,
grub_efi_uint32_t *descriptor_version);
grub_err_t
grub_efiemu_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t,
grub_uint64_t,