summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/settings.h
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/settings.h
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/settings.h')
-rw-r--r--src/include/gpxe/settings.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/include/gpxe/settings.h b/src/include/gpxe/settings.h
index 4f7f98ef..c25b6ad4 100644
--- a/src/include/gpxe/settings.h
+++ b/src/include/gpxe/settings.h
@@ -37,10 +37,10 @@ struct setting {
};
/** Configuration setting table */
-#define SETTINGS "settings"
+#define SETTINGS __table ( struct setting, "settings" )
/** Declare a configuration setting */
-#define __setting __table ( struct setting, SETTINGS, 01 )
+#define __setting __table_entry ( SETTINGS, 01 )
/** Settings block operations */
struct settings_operations {
@@ -127,11 +127,10 @@ struct setting_type {
};
/** Configuration setting type table */
-#define SETTING_TYPES "setting_types"
+#define SETTING_TYPES __table ( struct setting_type, "setting_types" )
/** Declare a configuration setting type */
-#define __setting_type \
- __table ( struct setting_type, SETTING_TYPES, 01 )
+#define __setting_type __table_entry ( SETTING_TYPES, 01 )
/**
* A settings applicator
@@ -146,11 +145,11 @@ struct settings_applicator {
};
/** Settings applicator table */
-#define SETTINGS_APPLICATORS "settings_applicators"
+#define SETTINGS_APPLICATORS \
+ __table ( struct settings_applicator, "settings_applicators" )
/** Declare a settings applicator */
-#define __settings_applicator \
- __table ( struct settings_applicator, SETTINGS_APPLICATORS, 01 )
+#define __settings_applicator __table_entry ( SETTINGS_APPLICATORS, 01 )
/**
* A simple settings block