summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/efi
diff options
context:
space:
mode:
authorMichael Brown2009-03-13 01:13:38 +0100
committerMichael Brown2009-03-13 03:10:21 +0100
commit3c68ff99eaff6e0d615349bdc85ea12ad8345284 (patch)
tree969a335fe8d1685203f7bfe90d07868dcbc1fe34 /src/include/gpxe/efi
parent[tables] Redefine methods for accessing linker tables (diff)
downloadipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.tar.gz
ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.tar.xz
ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.zip
[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.
Diffstat (limited to 'src/include/gpxe/efi')
-rw-r--r--src/include/gpxe/efi/efi.h11
1 files changed, 5 insertions, 6 deletions
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
*