2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>

Fix 64-bit efiemu

	* include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
	correct wrong typedef
	* efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
This commit is contained in:
phcoder 2009-07-15 22:04:41 +00:00
parent 560ca572fa
commit a58da8c77b
3 changed files with 15 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
Fix 64-bit efiemu
* include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
correct wrong typedef
* efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
2009-07-15 Pavel Roskin <proski@gnu.org>
* include/grub/disk.h (struct grub_disk_dev): Use enum for id.

View file

@ -63,14 +63,15 @@ SUFFIX (grub_efiemu_prepare) (struct grub_efiemu_prepare_hook *prepare_hooks,
curhook->hook (curhook->data);
/* Move runtime to its due place */
if ((err = grub_efiemu_loadcore_load ()))
err = grub_efiemu_loadcore_load ();
if (err)
{
grub_efiemu_unload ();
return err;
}
if ((err = grub_efiemu_resolve_symbol ("efiemu_system_table",
&handle, &off)))
err = grub_efiemu_resolve_symbol ("efiemu_system_table", &handle, &off);
if (err)
{
grub_efiemu_unload ();
return err;
@ -78,14 +79,14 @@ SUFFIX (grub_efiemu_prepare) (struct grub_efiemu_prepare_hook *prepare_hooks,
SUFFIX (grub_efiemu_system_table)
= (struct SUFFIX (grub_efi_system_table) *)
((grub_uint8_t *)grub_efiemu_mm_obtain_request (handle) + off);
((grub_uint8_t *) grub_efiemu_mm_obtain_request (handle) + off);
/* compute CRC32 of runtime_services */
if ((err = grub_efiemu_resolve_symbol ("efiemu_runtime_services",
&handle, &off)))
return err;
runtime_services = (struct SUFFIX (grub_efiemu_runtime_services) *)
((grub_uint8_t *)grub_efiemu_mm_obtain_request (handle) + off);
((grub_uint8_t *) grub_efiemu_mm_obtain_request (handle) + off);
runtime_services->hdr.crc32 = 0;
runtime_services->hdr.crc32 = grub_getcrc32
(0, runtime_services, runtime_services->hdr.header_size);

View file

@ -187,7 +187,7 @@ struct grub_efiemu_configuration_table64
grub_efi_guid_t vendor_guid;
grub_efi_uint64_t vendor_table;
} __attribute__ ((packed));
typedef struct grub_efiemu_configuration_table32 grub_efiemu_configuration_table64_t;
typedef struct grub_efiemu_configuration_table64 grub_efiemu_configuration_table64_t;
grub_err_t grub_efiemu_unregister_configuration_table (grub_efi_guid_t guid);
grub_err_t
grub_efiemu_register_configuration_table (grub_efi_guid_t guid,