[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:
@@ -8,9 +8,9 @@ struct sanboot_protocol {
|
||||
int ( * boot ) ( const char *root_path );
|
||||
};
|
||||
|
||||
#define SANBOOT_PROTOCOLS "sanboot_protocols"
|
||||
#define SANBOOT_PROTOCOLS \
|
||||
__table ( struct sanboot_protocol, "sanboot_protocols" )
|
||||
|
||||
#define __sanboot_protocol \
|
||||
__table ( struct sanboot_protocol, SANBOOT_PROTOCOLS, 01 )
|
||||
#define __sanboot_protocol __table_entry ( SANBOOT_PROTOCOLS, 01 )
|
||||
|
||||
#endif /* _GPXE_SANBOOT_H */
|
||||
|
||||
Reference in New Issue
Block a user