mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 10:02:42 +03:00
[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:
@@ -86,7 +86,7 @@ struct console_driver {
|
||||
};
|
||||
|
||||
/** Console driver table */
|
||||
#define CONSOLES "consoles"
|
||||
#define CONSOLES __table ( struct console_driver, "consoles" )
|
||||
|
||||
/**
|
||||
* Mark a <tt> struct console_driver </tt> as being part of the
|
||||
@@ -105,7 +105,7 @@ struct console_driver {
|
||||
* @endcode
|
||||
*
|
||||
*/
|
||||
#define __console_driver __table ( struct console_driver, CONSOLES, 01 )
|
||||
#define __console_driver __table_entry ( CONSOLES, 01 )
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user