diff options
author | Michael Brown | 2007-01-10 06:08:05 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-10 06:08:05 +0100 |
commit | 77bb7b13a7de9b647ab57035210910219f472728 (patch) | |
tree | 2284dd8a96dbdb5eaf0cba3d3ed075d35b25bfb4 /src/core/settings.c | |
parent | Add "name" field to struct device to allow human-readable hardware device (diff) | |
download | ipxe-77bb7b13a7de9b647ab57035210910219f472728.tar.gz ipxe-77bb7b13a7de9b647ab57035210910219f472728.tar.xz ipxe-77bb7b13a7de9b647ab57035210910219f472728.zip |
Having forced __table() to natural structure alignment, it now seems
that we *can* place arrays in tables, which means we can force the
order within a table without having to resort to explicitly numbered
sections on everything.
Diffstat (limited to 'src/core/settings.c')
-rw-r--r-- | src/core/settings.c | 84 |
1 files changed, 43 insertions, 41 deletions
diff --git a/src/core/settings.c b/src/core/settings.c index 5d36c30e..a1f40444 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -357,45 +357,47 @@ struct config_setting_type config_setting_type_int8 __config_setting_type = { }; /** Some basic setting definitions */ -struct config_setting ip_config_setting __config_setting = { - .name = "ip", - .description = "IP address of this machine (e.g. 192.168.0.1)", - .tag = DHCP_EB_YIADDR, - .type = &config_setting_type_ipv4, -}; -struct config_setting hostname_config_setting __config_setting = { - .name = "hostname", - .description = "Host name of this machine", - .tag = DHCP_HOST_NAME, - .type = &config_setting_type_string, -}; -struct config_setting username_config_setting __config_setting = { - .name = "username", - .description = "User name for authentication to servers", - .tag = DHCP_EB_USERNAME, - .type = &config_setting_type_string, -}; -struct config_setting password_config_setting __config_setting = { - .name = "password", - .description = "Password for authentication to servers", - .tag = DHCP_EB_PASSWORD, - .type = &config_setting_type_string, -}; -struct config_setting root_path_config_setting __config_setting = { - .name = "root-path", - .description = "NFS/iSCSI root path", - .tag = DHCP_ROOT_PATH, - .type = &config_setting_type_string, -}; -struct config_setting priority_config_setting __config_setting = { - .name = "priority", - .description = "Priority of these options", - .tag = DHCP_EB_PRIORITY, - .type = &config_setting_type_int8, -}; -struct config_setting iscsi_initiator_setting __config_setting = { - .name = "initiator-iqn", - .description = "iSCSI qualified name of this machine", - .tag = DHCP_ISCSI_INITIATOR_IQN, - .type = &config_setting_type_string, +struct config_setting basic_config_settings[] __config_setting = { + { + .name = "ip", + .description = "IP address of this machine (e.g. 192.168.0.1)", + .tag = DHCP_EB_YIADDR, + .type = &config_setting_type_ipv4, + }, + { + .name = "hostname", + .description = "Host name of this machine", + .tag = DHCP_HOST_NAME, + .type = &config_setting_type_string, + }, + { + .name = "username", + .description = "User name for authentication to servers", + .tag = DHCP_EB_USERNAME, + .type = &config_setting_type_string, + }, + { + .name = "password", + .description = "Password for authentication to servers", + .tag = DHCP_EB_PASSWORD, + .type = &config_setting_type_string, + }, + { + .name = "root-path", + .description = "NFS/iSCSI root path", + .tag = DHCP_ROOT_PATH, + .type = &config_setting_type_string, + }, + { + .name = "priority", + .description = "Priority of these options", + .tag = DHCP_EB_PRIORITY, + .type = &config_setting_type_int8, + }, + { + .name = "initiator-iqn", + .description = "iSCSI qualified name of this machine", + .tag = DHCP_ISCSI_INITIATOR_IQN, + .type = &config_setting_type_string, + } }; |