From 3c68ff99eaff6e0d615349bdc85ea12ad8345284 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 13 Mar 2009 00:13:38 +0000 Subject: [tables] Incorporate table data type information into table definition Eliminate the potential for mismatches between table names and the table entry data type by incorporating the data type into the definition of the table, rather than specifying it explicitly in each table accessor method. --- src/include/gpxe/efi/efi.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/include/gpxe/efi/efi.h') diff --git a/src/include/gpxe/efi/efi.h b/src/include/gpxe/efi/efi.h index c44e09cb1..1f5b88563 100644 --- a/src/include/gpxe/efi/efi.h +++ b/src/include/gpxe/efi/efi.h @@ -55,11 +55,10 @@ struct efi_protocol { }; /** EFI protocol table */ -#define EFI_PROTOCOLS "efi_protocols" +#define EFI_PROTOCOLS __table ( struct efi_protocol, "efi_protocols" ) /** Declare an EFI protocol used by gPXE */ -#define __efi_protocol \ - __table ( struct efi_protocol, EFI_PROTOCOLS, 01 ) +#define __efi_protocol __table_entry ( EFI_PROTOCOLS, 01 ) /** Declare an EFI protocol to be required by gPXE * @@ -90,11 +89,11 @@ struct efi_config_table { }; /** EFI configuration table table */ -#define EFI_CONFIG_TABLES "efi_config_tables" +#define EFI_CONFIG_TABLES \ + __table ( struct efi_config_table, "efi_config_tables" ) /** Declare an EFI configuration table used by gPXE */ -#define __efi_config_table \ - __table ( struct efi_config_table, EFI_CONFIG_TABLES, 01 ) +#define __efi_config_table __table_entry ( EFI_CONFIG_TABLES, 01 ) /** Declare an EFI configuration table to be used by gPXE * -- cgit v1.2.3-55-g7522