[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.
This commit is contained in:
Michael Brown
2009-03-13 02:10:21 +00:00
parent 1266d7902b
commit 3c68ff99ea
26 changed files with 185 additions and 130 deletions
+2 -3
View File
@@ -124,11 +124,10 @@ struct image_type {
#define PROBE_PXE 03
/** Executable or loadable image type table */
#define IMAGE_TYPES "image_types"
#define IMAGE_TYPES __table ( struct image_type, "image_types" )
/** An executable or loadable image type */
#define __image_type( probe_order ) \
__table ( struct image_type, IMAGE_TYPES, probe_order )
#define __image_type( probe_order ) __table_entry ( IMAGE_TYPES, probe_order )
extern struct list_head images;