2009-06-27 Pavel Roskin <proski@gnu.org>
* efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to read. * efiemu/prepare32.c: Likewise. * efiemu/prepare64.c: Likewise.
This commit is contained in:
parent
c402ab1734
commit
97fe384ecb
4 changed files with 12 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-06-27 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
|
||||
read.
|
||||
* efiemu/prepare32.c: Likewise.
|
||||
* efiemu/prepare64.c: Likewise.
|
||||
|
||||
2009-06-26 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
|
||||
|
|
|
@ -35,8 +35,8 @@ SUFFIX (grub_efiemu_prepare) (struct grub_efiemu_prepare_hook *prepare_hooks,
|
|||
struct grub_efiemu_prepare_hook *curhook;
|
||||
|
||||
int cntconftables = 0;
|
||||
TYPE (grub_efiemu_configuration_table) *conftables = 0;
|
||||
TYPE (grub_efiemu_runtime_services) *runtime_services;
|
||||
struct SUFFIX (grub_efiemu_configuration_table) *conftables = 0;
|
||||
struct SUFFIX (grub_efiemu_runtime_services) *runtime_services;
|
||||
int i;
|
||||
int handle;
|
||||
grub_off_t off;
|
||||
|
@ -77,14 +77,14 @@ SUFFIX (grub_efiemu_prepare) (struct grub_efiemu_prepare_hook *prepare_hooks,
|
|||
}
|
||||
|
||||
SUFFIX (grub_efiemu_system_table)
|
||||
= (TYPE (grub_efi_system_table) *)
|
||||
= (struct SUFFIX (grub_efi_system_table) *)
|
||||
((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 = (TYPE (grub_efiemu_runtime_services) *)
|
||||
runtime_services = (struct SUFFIX (grub_efiemu_runtime_services) *)
|
||||
((grub_uint8_t *)grub_efiemu_mm_obtain_request (handle) + off);
|
||||
runtime_services->hdr.crc32 = 0;
|
||||
runtime_services->hdr.crc32 = grub_getcrc32
|
||||
|
@ -98,7 +98,7 @@ SUFFIX (grub_efiemu_prepare) (struct grub_efiemu_prepare_hook *prepare_hooks,
|
|||
SUFFIX(grub_efiemu_system_table)->num_table_entries = cntconftables;
|
||||
|
||||
/* Fill the list of configuration tables */
|
||||
conftables = (TYPE (grub_efiemu_configuration_table) *)
|
||||
conftables = (struct SUFFIX (grub_efiemu_configuration_table) *)
|
||||
grub_efiemu_mm_obtain_request (conftable_handle);
|
||||
i = 0;
|
||||
for (cur = config_tables; cur; cur = cur->next, i++)
|
||||
|
|
|
@ -18,6 +18,5 @@
|
|||
*/
|
||||
|
||||
#define SUFFIX(x) x ## 32
|
||||
#define TYPE(x) x ## 32_t
|
||||
|
||||
#include "prepare.c"
|
||||
|
|
|
@ -18,6 +18,5 @@
|
|||
*/
|
||||
|
||||
#define SUFFIX(x) x ## 64
|
||||
#define TYPE(x) x ## 64_t
|
||||
|
||||
#include "prepare.c"
|
||||
|
|
Loading…
Reference in a new issue