Ver código fonte

[settings] Force settings into alphabetical order within sections

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 anos atrás
pai
commit
b0942534eb

+ 20
- 18
src/arch/x86/core/cpuid_settings.c Ver arquivo

@@ -251,22 +251,24 @@ struct init_fn cpuid_settings_init_fn __init_fn ( INIT_NORMAL ) = {
251 251
 	.initialise = cpuid_settings_init,
252 252
 };
253 253
 
254
-/** CPUID predefined settings */
255
-const struct setting cpuid_predefined_settings[] __setting ( SETTING_HOST_EXTRA ) = {
256
-	{
257
-		.name = "cpuvendor",
258
-		.description = "CPU vendor",
259
-		.tag = CPUID_TAG ( CPUID_VENDOR_ID, 1, 1, 3,
260
-				   CPUID_EBX, CPUID_EDX, CPUID_ECX, 0 ),
261
-		.type = &setting_type_string,
262
-		.scope = &cpuid_settings_scope,
263
-	},
264
-	{
265
-		.name = "cpumodel",
266
-		.description = "CPU model",
267
-		.tag = CPUID_TAG ( CPUID_MODEL, 3, 1, 4,
268
-				   CPUID_EAX, CPUID_EBX, CPUID_ECX, CPUID_EDX ),
269
-		.type = &setting_type_string,
270
-		.scope = &cpuid_settings_scope,
271
-	},
254
+/** CPU vendor setting */
255
+const struct setting cpuvendor_setting __setting ( SETTING_HOST_EXTRA,
256
+						   cpuvendor ) = {
257
+	.name = "cpuvendor",
258
+	.description = "CPU vendor",
259
+	.tag = CPUID_TAG ( CPUID_VENDOR_ID, 1, 1, 3,
260
+			   CPUID_EBX, CPUID_EDX, CPUID_ECX, 0 ),
261
+	.type = &setting_type_string,
262
+	.scope = &cpuid_settings_scope,
263
+};
264
+
265
+/** CPU model setting */
266
+const struct setting cpumodel_setting __setting ( SETTING_HOST_EXTRA,
267
+						  cpumodel ) = {
268
+	.name = "cpumodel",
269
+	.description = "CPU model",
270
+	.tag = CPUID_TAG ( CPUID_MODEL, 3, 1, 4,
271
+			   CPUID_EAX, CPUID_EBX, CPUID_ECX, CPUID_EDX ),
272
+	.type = &setting_type_string,
273
+	.scope = &cpuid_settings_scope,
272 274
 };

+ 6
- 8
src/core/memmap_settings.c Ver arquivo

@@ -231,12 +231,10 @@ struct init_fn memmap_settings_init_fn __init_fn ( INIT_NORMAL ) = {
231 231
 };
232 232
 
233 233
 /** Memory map predefined settings */
234
-const struct setting memmap_predefined_settings[] __setting ( SETTING_MISC ) = {
235
-	{
236
-		.name = "memsize",
237
-		.description = "Memory size (in MB)",
238
-		.tag = MEMMAP_TAG ( 0, 0x100, 0, 1, 1, 20 ),
239
-		.type = &setting_type_int32,
240
-		.scope = &memmap_settings_scope,
241
-	},
234
+const struct setting memsize_setting __setting ( SETTING_MISC, memsize ) = {
235
+	.name = "memsize",
236
+	.description = "Memory size (in MB)",
237
+	.tag = MEMMAP_TAG ( 0, 0x100, 0, 1, 1, 20 ),
238
+	.type = &setting_type_int32,
239
+	.scope = &memmap_settings_scope,
242 240
 };

+ 14
- 13
src/core/settings.c Ver arquivo

@@ -2312,7 +2312,7 @@ char * expand_settings ( const char *string ) {
2312 2312
  */
2313 2313
 
2314 2314
 /** Hostname setting */
2315
-const struct setting hostname_setting __setting ( SETTING_HOST ) = {
2315
+const struct setting hostname_setting __setting ( SETTING_HOST, hostname ) = {
2316 2316
 	.name = "hostname",
2317 2317
 	.description = "Host name",
2318 2318
 	.tag = DHCP_HOST_NAME,
@@ -2320,7 +2320,7 @@ const struct setting hostname_setting __setting ( SETTING_HOST ) = {
2320 2320
 };
2321 2321
 
2322 2322
 /** Domain name setting */
2323
-const struct setting domain_setting __setting ( SETTING_IPv4_EXTRA ) = {
2323
+const struct setting domain_setting __setting ( SETTING_IPv4_EXTRA, domain ) = {
2324 2324
 	.name = "domain",
2325 2325
 	.description = "DNS domain",
2326 2326
 	.tag = DHCP_DOMAIN_NAME,
@@ -2328,7 +2328,7 @@ const struct setting domain_setting __setting ( SETTING_IPv4_EXTRA ) = {
2328 2328
 };
2329 2329
 
2330 2330
 /** TFTP server setting */
2331
-const struct setting next_server_setting __setting ( SETTING_BOOT ) = {
2331
+const struct setting next_server_setting __setting ( SETTING_BOOT,next-server)={
2332 2332
 	.name = "next-server",
2333 2333
 	.description = "TFTP server",
2334 2334
 	.tag = DHCP_EB_SIADDR,
@@ -2336,7 +2336,7 @@ const struct setting next_server_setting __setting ( SETTING_BOOT ) = {
2336 2336
 };
2337 2337
 
2338 2338
 /** Filename setting */
2339
-const struct setting filename_setting __setting ( SETTING_BOOT ) = {
2339
+const struct setting filename_setting __setting ( SETTING_BOOT, filename ) = {
2340 2340
 	.name = "filename",
2341 2341
 	.description = "Boot filename",
2342 2342
 	.tag = DHCP_BOOTFILE_NAME,
@@ -2344,7 +2344,7 @@ const struct setting filename_setting __setting ( SETTING_BOOT ) = {
2344 2344
 };
2345 2345
 
2346 2346
 /** Root path setting */
2347
-const struct setting root_path_setting __setting ( SETTING_SANBOOT ) = {
2347
+const struct setting root_path_setting __setting ( SETTING_SANBOOT, root-path)={
2348 2348
 	.name = "root-path",
2349 2349
 	.description = "SAN root path",
2350 2350
 	.tag = DHCP_ROOT_PATH,
@@ -2352,7 +2352,7 @@ const struct setting root_path_setting __setting ( SETTING_SANBOOT ) = {
2352 2352
 };
2353 2353
 
2354 2354
 /** Username setting */
2355
-const struct setting username_setting __setting ( SETTING_AUTH ) = {
2355
+const struct setting username_setting __setting ( SETTING_AUTH, username ) = {
2356 2356
 	.name = "username",
2357 2357
 	.description = "User name",
2358 2358
 	.tag = DHCP_EB_USERNAME,
@@ -2360,7 +2360,7 @@ const struct setting username_setting __setting ( SETTING_AUTH ) = {
2360 2360
 };
2361 2361
 
2362 2362
 /** Password setting */
2363
-const struct setting password_setting __setting ( SETTING_AUTH ) = {
2363
+const struct setting password_setting __setting ( SETTING_AUTH, password ) = {
2364 2364
 	.name = "password",
2365 2365
 	.description = "Password",
2366 2366
 	.tag = DHCP_EB_PASSWORD,
@@ -2368,7 +2368,7 @@ const struct setting password_setting __setting ( SETTING_AUTH ) = {
2368 2368
 };
2369 2369
 
2370 2370
 /** Priority setting */
2371
-const struct setting priority_setting __setting ( SETTING_MISC ) = {
2371
+const struct setting priority_setting __setting ( SETTING_MISC, priority ) = {
2372 2372
 	.name = "priority",
2373 2373
 	.description = "Settings priority",
2374 2374
 	.tag = DHCP_EB_PRIORITY,
@@ -2376,7 +2376,8 @@ const struct setting priority_setting __setting ( SETTING_MISC ) = {
2376 2376
 };
2377 2377
 
2378 2378
 /** DHCP user class setting */
2379
-const struct setting user_class_setting __setting ( SETTING_HOST_EXTRA ) = {
2379
+const struct setting user_class_setting __setting ( SETTING_HOST_EXTRA,
2380
+						    user-class ) = {
2380 2381
 	.name = "user-class",
2381 2382
 	.description = "DHCP user class",
2382 2383
 	.tag = DHCP_USER_CLASS_ID,
@@ -2412,7 +2413,7 @@ static int errno_fetch ( void *data, size_t len ) {
2412 2413
 }
2413 2414
 
2414 2415
 /** Error number setting */
2415
-const struct setting errno_setting __setting ( SETTING_MISC ) = {
2416
+const struct setting errno_setting __setting ( SETTING_MISC, errno ) = {
2416 2417
 	.name = "errno",
2417 2418
 	.description = "Last error",
2418 2419
 	.type = &setting_type_uint32,
@@ -2440,7 +2441,7 @@ static int buildarch_fetch ( void *data, size_t len ) {
2440 2441
 }
2441 2442
 
2442 2443
 /** Build architecture setting */
2443
-const struct setting buildarch_setting __setting ( SETTING_MISC ) = {
2444
+const struct setting buildarch_setting __setting ( SETTING_MISC, buildarch ) = {
2444 2445
 	.name = "buildarch",
2445 2446
 	.description = "Build architecture",
2446 2447
 	.type = &setting_type_string,
@@ -2468,7 +2469,7 @@ static int platform_fetch ( void *data, size_t len ) {
2468 2469
 }
2469 2470
 
2470 2471
 /** Platform setting */
2471
-const struct setting platform_setting __setting ( SETTING_MISC ) = {
2472
+const struct setting platform_setting __setting ( SETTING_MISC, platform ) = {
2472 2473
 	.name = "platform",
2473 2474
 	.description = "Platform",
2474 2475
 	.type = &setting_type_string,
@@ -2494,7 +2495,7 @@ static int version_fetch ( void *data, size_t len ) {
2494 2495
 }
2495 2496
 
2496 2497
 /** Version setting */
2497
-const struct setting version_setting __setting ( SETTING_MISC ) = {
2498
+const struct setting version_setting __setting ( SETTING_MISC, version ) = {
2498 2499
 	.name = "version",
2499 2500
 	.description = "Version",
2500 2501
 	.type = &setting_type_string,

+ 2
- 2
src/crypto/clientcert.c Ver arquivo

@@ -92,7 +92,7 @@ struct client_private_key client_private_key = {
92 92
 };
93 93
 
94 94
 /** Client certificate setting */
95
-static struct setting cert_setting __setting ( SETTING_CRYPTO ) = {
95
+static struct setting cert_setting __setting ( SETTING_CRYPTO, cert ) = {
96 96
 	.name = "cert",
97 97
 	.description = "Client certificate",
98 98
 	.tag = DHCP_EB_CERT,
@@ -100,7 +100,7 @@ static struct setting cert_setting __setting ( SETTING_CRYPTO ) = {
100 100
 };
101 101
 
102 102
 /** Client private key setting */
103
-static struct setting privkey_setting __setting ( SETTING_CRYPTO ) = {
103
+static struct setting privkey_setting __setting ( SETTING_CRYPTO, privkey ) = {
104 104
 	.name = "privkey",
105 105
 	.description = "Client private key",
106 106
 	.tag = DHCP_EB_KEY,

+ 1
- 1
src/crypto/rootcert.c Ver arquivo

@@ -58,7 +58,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
58 58
 static const uint8_t fingerprints[] = { TRUSTED };
59 59
 
60 60
 /** Root certificate fingerprint setting */
61
-static struct setting trust_setting __setting ( SETTING_CRYPTO ) = {
61
+static struct setting trust_setting __setting ( SETTING_CRYPTO, trust ) = {
62 62
 	.name = "trust",
63 63
 	.description = "Trusted root certificate fingerprints",
64 64
 	.tag = DHCP_EB_TRUST,

+ 2
- 1
src/include/ipxe/net80211.h Ver arquivo

@@ -1093,7 +1093,8 @@ struct net80211_wlan
1093 1093
 
1094 1094
 
1095 1095
 /** 802.11 encryption key setting */
1096
-extern const struct setting net80211_key_setting __setting ( SETTING_NETDEV_EXTRA );
1096
+extern const struct setting
1097
+net80211_key_setting __setting ( SETTING_NETDEV_EXTRA, key );
1097 1098
 
1098 1099
 
1099 1100
 /**

+ 34
- 17
src/include/ipxe/settings.h Ver arquivo

@@ -53,7 +53,8 @@ struct setting {
53 53
 #define SETTINGS __table ( struct setting, "settings" )
54 54
 
55 55
 /** Declare a configuration setting */
56
-#define __setting( setting_order ) __table_entry ( SETTINGS, setting_order )
56
+#define __setting( setting_order, name ) \
57
+	__table_entry ( SETTINGS, setting_order.name )
57 58
 
58 59
 /** @defgroup setting_order Setting ordering
59 60
  * @{
@@ -419,22 +420,38 @@ extern const struct setting_type setting_type_hexraw __setting_type;
419 420
 extern const struct setting_type setting_type_uuid __setting_type;
420 421
 extern const struct setting_type setting_type_busdevfn __setting_type;
421 422
 
422
-extern const struct setting ip_setting __setting ( SETTING_IPv4 );
423
-extern const struct setting netmask_setting __setting ( SETTING_IPv4 );
424
-extern const struct setting gateway_setting __setting ( SETTING_IPv4 );
425
-extern const struct setting dns_setting __setting ( SETTING_IPv4_EXTRA );
426
-extern const struct setting hostname_setting __setting ( SETTING_HOST );
427
-extern const struct setting domain_setting __setting ( SETTING_IPv4_EXTRA );
428
-extern const struct setting filename_setting __setting ( SETTING_BOOT );
429
-extern const struct setting root_path_setting __setting ( SETTING_SANBOOT );
430
-extern const struct setting username_setting __setting ( SETTING_AUTH );
431
-extern const struct setting password_setting __setting ( SETTING_AUTH );
432
-extern const struct setting priority_setting __setting ( SETTING_MISC );
433
-extern const struct setting uuid_setting __setting ( SETTING_HOST );
434
-extern const struct setting next_server_setting __setting ( SETTING_BOOT );
435
-extern const struct setting mac_setting __setting ( SETTING_NETDEV );
436
-extern const struct setting busid_setting __setting ( SETTING_NETDEV );
437
-extern const struct setting user_class_setting __setting ( SETTING_HOST_EXTRA );
423
+extern const struct setting
424
+ip_setting __setting ( SETTING_IPv4, ip );
425
+extern const struct setting
426
+netmask_setting __setting ( SETTING_IPv4, netmask );
427
+extern const struct setting
428
+gateway_setting __setting ( SETTING_IPv4, gateway );
429
+extern const struct setting
430
+dns_setting __setting ( SETTING_IPv4_EXTRA, dns );
431
+extern const struct setting
432
+hostname_setting __setting ( SETTING_HOST, hostname );
433
+extern const struct setting
434
+domain_setting __setting ( SETTING_IPv4_EXTRA, domain );
435
+extern const struct setting
436
+filename_setting __setting ( SETTING_BOOT, filename );
437
+extern const struct setting
438
+root_path_setting __setting ( SETTING_SANBOOT, root-path );
439
+extern const struct setting
440
+username_setting __setting ( SETTING_AUTH, username );
441
+extern const struct setting
442
+password_setting __setting ( SETTING_AUTH, password );
443
+extern const struct setting
444
+priority_setting __setting ( SETTING_MISC, priority );
445
+extern const struct setting
446
+uuid_setting __setting ( SETTING_HOST, uuid );
447
+extern const struct setting
448
+next_server_setting __setting ( SETTING_BOOT, next-server );
449
+extern const struct setting
450
+mac_setting __setting ( SETTING_NETDEV, mac );
451
+extern const struct setting
452
+busid_setting __setting ( SETTING_NETDEV, busid );
453
+extern const struct setting
454
+user_class_setting __setting ( SETTING_HOST_EXTRA, user-class );
438 455
 
439 456
 /**
440 457
  * Initialise a settings block

+ 44
- 39
src/interface/smbios/smbios_settings.c Ver arquivo

@@ -188,7 +188,7 @@ struct init_fn smbios_init_fn __init_fn ( INIT_NORMAL ) = {
188 188
 };
189 189
 
190 190
 /** UUID setting obtained via SMBIOS */
191
-const struct setting uuid_setting __setting ( SETTING_HOST ) = {
191
+const struct setting uuid_setting __setting ( SETTING_HOST, uuid ) = {
192 192
 	.name = "uuid",
193 193
 	.description = "UUID",
194 194
 	.tag = SMBIOS_RAW_TAG ( SMBIOS_TYPE_SYSTEM_INFORMATION,
@@ -197,42 +197,47 @@ const struct setting uuid_setting __setting ( SETTING_HOST ) = {
197 197
 	.scope = &smbios_settings_scope,
198 198
 };
199 199
 
200
-/** Other SMBIOS predefined settings */
201
-const struct setting smbios_predefined_settings[] __setting ( SETTING_HOST_EXTRA ) = {
202
-	{
203
-		.name = "manufacturer",
204
-		.description = "Manufacturer",
205
-		.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_SYSTEM_INFORMATION,
206
-					   struct smbios_system_information,
207
-					   manufacturer ),
208
-		.type = &setting_type_string,
209
-		.scope = &smbios_settings_scope,
210
-	},
211
-	{
212
-		.name = "product",
213
-		.description = "Product name",
214
-		.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_SYSTEM_INFORMATION,
215
-					   struct smbios_system_information,
216
-					   product ),
217
-		.type = &setting_type_string,
218
-		.scope = &smbios_settings_scope,
219
-	},
220
-	{
221
-		.name = "serial",
222
-		.description = "Serial number",
223
-		.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_SYSTEM_INFORMATION,
224
-					   struct smbios_system_information,
225
-					   serial ),
226
-		.type = &setting_type_string,
227
-		.scope = &smbios_settings_scope,
228
-	},
229
-	{
230
-		.name = "asset",
231
-		.description = "Asset tag",
232
-		.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_ENCLOSURE_INFORMATION,
233
-					   struct smbios_enclosure_information,
234
-					   asset_tag ),
235
-		.type = &setting_type_string,
236
-		.scope = &smbios_settings_scope,
237
-	},
200
+/** Manufacturer name setting */
201
+const struct setting manufacturer_setting __setting ( SETTING_HOST_EXTRA,
202
+						      manufacturer ) = {
203
+	.name = "manufacturer",
204
+	.description = "Manufacturer",
205
+	.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_SYSTEM_INFORMATION,
206
+				   struct smbios_system_information,
207
+				   manufacturer ),
208
+	.type = &setting_type_string,
209
+	.scope = &smbios_settings_scope,
210
+};
211
+
212
+/** Product name setting */
213
+const struct setting product_setting __setting ( SETTING_HOST_EXTRA, product )={
214
+	.name = "product",
215
+	.description = "Product name",
216
+	.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_SYSTEM_INFORMATION,
217
+				   struct smbios_system_information,
218
+				   product ),
219
+	.type = &setting_type_string,
220
+	.scope = &smbios_settings_scope,
221
+};
222
+
223
+/** Serial number setting */
224
+const struct setting serial_setting __setting ( SETTING_HOST_EXTRA, serial ) = {
225
+	.name = "serial",
226
+	.description = "Serial number",
227
+	.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_SYSTEM_INFORMATION,
228
+				   struct smbios_system_information,
229
+				   serial ),
230
+	.type = &setting_type_string,
231
+	.scope = &smbios_settings_scope,
232
+};
233
+
234
+/** Asset tag setting */
235
+const struct setting asset_setting __setting ( SETTING_HOST_EXTRA, asset ) = {
236
+	.name = "asset",
237
+	.description = "Asset tag",
238
+	.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_ENCLOSURE_INFORMATION,
239
+				   struct smbios_enclosure_information,
240
+				   asset_tag ),
241
+	.type = &setting_type_string,
242
+	.scope = &smbios_settings_scope,
238 243
 };

+ 6
- 3
src/net/80211/net80211.c Ver arquivo

@@ -204,7 +204,8 @@ struct settings_applicator net80211_applicator __settings_applicator = {
204 204
  * If this is blank, we scan for all networks and use the one with the
205 205
  * greatest signal strength.
206 206
  */
207
-const struct setting net80211_ssid_setting __setting ( SETTING_NETDEV_EXTRA ) = {
207
+const struct setting net80211_ssid_setting __setting ( SETTING_NETDEV_EXTRA,
208
+						       ssid ) = {
208 209
 	.name = "ssid",
209 210
 	.description = "Wireless SSID",
210 211
 	.type = &setting_type_string,
@@ -216,7 +217,8 @@ const struct setting net80211_ssid_setting __setting ( SETTING_NETDEV_EXTRA ) =
216 217
  * active scan (send probe packets). If this setting is nonzero, an
217 218
  * active scan on the 2.4GHz band will be used to associate.
218 219
  */
219
-const struct setting net80211_active_setting __setting ( SETTING_NETDEV_EXTRA ) = {
220
+const struct setting net80211_active_setting __setting ( SETTING_NETDEV_EXTRA,
221
+							 active-scan ) = {
220 222
 	.name = "active-scan",
221 223
 	.description = "Actively scan for wireless networks",
222 224
 	.type = &setting_type_int8,
@@ -228,7 +230,8 @@ const struct setting net80211_active_setting __setting ( SETTING_NETDEV_EXTRA )
228 230
  * normal iPXE method for entering hex settings; an ASCII string of
229 231
  * hex characters will not behave as expected.
230 232
  */
231
-const struct setting net80211_key_setting __setting ( SETTING_NETDEV_EXTRA ) = {
233
+const struct setting net80211_key_setting __setting ( SETTING_NETDEV_EXTRA,
234
+						      key ) = {
232 235
 	.name = "key",
233 236
 	.description = "Wireless encryption key",
234 237
 	.type = &setting_type_string,

+ 3
- 3
src/net/ipv4.c Ver arquivo

@@ -636,7 +636,7 @@ int format_ipv4_setting ( const struct setting_type *type __unused,
636 636
 }
637 637
 
638 638
 /** IPv4 address setting */
639
-const struct setting ip_setting __setting ( SETTING_IPv4 ) = {
639
+const struct setting ip_setting __setting ( SETTING_IPv4, ip ) = {
640 640
 	.name = "ip",
641 641
 	.description = "IP address",
642 642
 	.tag = DHCP_EB_YIADDR,
@@ -644,7 +644,7 @@ const struct setting ip_setting __setting ( SETTING_IPv4 ) = {
644 644
 };
645 645
 
646 646
 /** IPv4 subnet mask setting */
647
-const struct setting netmask_setting __setting ( SETTING_IPv4 ) = {
647
+const struct setting netmask_setting __setting ( SETTING_IPv4, netmask ) = {
648 648
 	.name = "netmask",
649 649
 	.description = "Subnet mask",
650 650
 	.tag = DHCP_SUBNET_MASK,
@@ -652,7 +652,7 @@ const struct setting netmask_setting __setting ( SETTING_IPv4 ) = {
652 652
 };
653 653
 
654 654
 /** Default gateway setting */
655
-const struct setting gateway_setting __setting ( SETTING_IPv4 ) = {
655
+const struct setting gateway_setting __setting ( SETTING_IPv4, gateway ) = {
656 656
 	.name = "gateway",
657 657
 	.description = "Default gateway",
658 658
 	.tag = DHCP_ROUTERS,

+ 5
- 5
src/net/netdev_settings.c Ver arquivo

@@ -36,27 +36,27 @@ FILE_LICENCE ( GPL2_OR_LATER );
36 36
  */
37 37
 
38 38
 /** Network device predefined settings */
39
-const struct setting mac_setting __setting ( SETTING_NETDEV ) = {
39
+const struct setting mac_setting __setting ( SETTING_NETDEV, mac ) = {
40 40
 	.name = "mac",
41 41
 	.description = "MAC address",
42 42
 	.type = &setting_type_hex,
43 43
 };
44
-const struct setting bustype_setting __setting ( SETTING_NETDEV ) = {
44
+const struct setting bustype_setting __setting ( SETTING_NETDEV, bustype ) = {
45 45
 	.name = "bustype",
46 46
 	.description = "Bus type",
47 47
 	.type = &setting_type_string,
48 48
 };
49
-const struct setting busloc_setting __setting ( SETTING_NETDEV ) = {
49
+const struct setting busloc_setting __setting ( SETTING_NETDEV, busloc ) = {
50 50
 	.name = "busloc",
51 51
 	.description = "Bus location",
52 52
 	.type = &setting_type_uint32,
53 53
 };
54
-const struct setting busid_setting __setting ( SETTING_NETDEV ) = {
54
+const struct setting busid_setting __setting ( SETTING_NETDEV, busid ) = {
55 55
 	.name = "busid",
56 56
 	.description = "Bus ID",
57 57
 	.type = &setting_type_hex,
58 58
 };
59
-const struct setting chip_setting __setting ( SETTING_NETDEV ) = {
59
+const struct setting chip_setting __setting ( SETTING_NETDEV, chip ) = {
60 60
 	.name = "chip",
61 61
 	.description = "Chip",
62 62
 	.type = &setting_type_string,

+ 6
- 3
src/net/tcp/iscsi.c Ver arquivo

@@ -1860,7 +1860,8 @@ enum iscsi_root_path_component {
1860 1860
 };
1861 1861
 
1862 1862
 /** iSCSI initiator IQN setting */
1863
-const struct setting initiator_iqn_setting __setting ( SETTING_SANBOOT_EXTRA ) = {
1863
+const struct setting initiator_iqn_setting __setting ( SETTING_SANBOOT_EXTRA,
1864
+						       initiator-iqn ) = {
1864 1865
 	.name = "initiator-iqn",
1865 1866
 	.description = "iSCSI initiator name",
1866 1867
 	.tag = DHCP_ISCSI_INITIATOR_IQN,
@@ -1868,7 +1869,8 @@ const struct setting initiator_iqn_setting __setting ( SETTING_SANBOOT_EXTRA ) =
1868 1869
 };
1869 1870
 
1870 1871
 /** iSCSI reverse username setting */
1871
-const struct setting reverse_username_setting __setting ( SETTING_AUTH_EXTRA ) = {
1872
+const struct setting reverse_username_setting __setting ( SETTING_AUTH_EXTRA,
1873
+							  reverse-username ) = {
1872 1874
 	.name = "reverse-username",
1873 1875
 	.description = "Reverse user name",
1874 1876
 	.tag = DHCP_EB_REVERSE_USERNAME,
@@ -1876,7 +1878,8 @@ const struct setting reverse_username_setting __setting ( SETTING_AUTH_EXTRA ) =
1876 1878
 };
1877 1879
 
1878 1880
 /** iSCSI reverse password setting */
1879
-const struct setting reverse_password_setting __setting ( SETTING_AUTH_EXTRA ) = {
1881
+const struct setting reverse_password_setting __setting ( SETTING_AUTH_EXTRA,
1882
+							  reverse-password ) = {
1880 1883
 	.name = "reverse-password",
1881 1884
 	.description = "Reverse password",
1882 1885
 	.tag = DHCP_EB_REVERSE_PASSWORD,

+ 2
- 2
src/net/tcp/oncrpc.c Ver arquivo

@@ -58,14 +58,14 @@ struct oncrpc_cred oncrpc_auth_none = {
58 58
 	.length = 0
59 59
 };
60 60
 
61
-const struct setting uid_setting __setting ( SETTING_AUTH ) = {
61
+const struct setting uid_setting __setting ( SETTING_AUTH, uid ) = {
62 62
 	.name        = "uid",
63 63
 	.description = "User ID",
64 64
 	.tag         = DHCP_EB_UID,
65 65
 	.type        = &setting_type_uint32
66 66
 };
67 67
 
68
-const struct setting gid_setting __setting ( SETTING_AUTH ) = {
68
+const struct setting gid_setting __setting ( SETTING_AUTH, gid ) = {
69 69
 	.name        = "gid",
70 70
 	.description = "Group ID",
71 71
 	.tag         = DHCP_EB_GID,

+ 1
- 1
src/net/tcp/syslogs.c Ver arquivo

@@ -189,7 +189,7 @@ struct console_driver syslogs_console __console_driver = {
189 189
  */
190 190
 
191 191
 /** Encrypted syslog server setting */
192
-const struct setting syslogs_setting __setting ( SETTING_MISC ) = {
192
+const struct setting syslogs_setting __setting ( SETTING_MISC, syslogs ) = {
193 193
 	.name = "syslogs",
194 194
 	.description = "Encrypted syslog server",
195 195
 	.tag = DHCP_EB_SYSLOGS_SERVER,

+ 2
- 1
src/net/udp/dhcp.c Ver arquivo

@@ -92,7 +92,8 @@ static uint8_t dhcp_request_options_data[] = {
92 92
 };
93 93
 
94 94
 /** DHCP server address setting */
95
-const struct setting dhcp_server_setting __setting ( SETTING_MISC ) = {
95
+const struct setting dhcp_server_setting __setting ( SETTING_MISC,
96
+						     dhcp-server ) = {
96 97
 	.name = "dhcp-server",
97 98
 	.description = "DHCP server",
98 99
 	.tag = DHCP_SERVER_IDENTIFIER,

+ 2
- 2
src/net/udp/dns.c Ver arquivo

@@ -652,7 +652,7 @@ struct resolver dns_resolver __resolver ( RESOLV_NORMAL ) = {
652 652
  */
653 653
 
654 654
 /** IPv4 DNS server setting */
655
-const struct setting dns_setting __setting ( SETTING_IPv4_EXTRA ) = {
655
+const struct setting dns_setting __setting ( SETTING_IPv4_EXTRA, dns ) = {
656 656
 	.name = "dns",
657 657
 	.description = "DNS server",
658 658
 	.tag = DHCP_DNS_SERVERS,
@@ -660,7 +660,7 @@ const struct setting dns_setting __setting ( SETTING_IPv4_EXTRA ) = {
660 660
 };
661 661
 
662 662
 /** IPv6 DNS server setting */
663
-const struct setting dns6_setting __setting ( SETTING_IPv6_EXTRA ) = {
663
+const struct setting dns6_setting __setting ( SETTING_IPv6_EXTRA, dns6 ) = {
664 664
 	.name = "dns6",
665 665
 	.description = "DNS server",
666 666
 	.tag = DHCPV6_DNS_SERVERS,

+ 2
- 2
src/net/udp/syslog.c Ver arquivo

@@ -195,7 +195,7 @@ struct console_driver syslog_console __console_driver = {
195 195
  */
196 196
 
197 197
 /** IPv4 syslog server setting */
198
-const struct setting syslog_setting __setting ( SETTING_MISC ) = {
198
+const struct setting syslog_setting __setting ( SETTING_MISC, syslog ) = {
199 199
 	.name = "syslog",
200 200
 	.description = "Syslog server",
201 201
 	.tag = DHCP_LOG_SERVERS,
@@ -203,7 +203,7 @@ const struct setting syslog_setting __setting ( SETTING_MISC ) = {
203 203
 };
204 204
 
205 205
 /** IPv6 syslog server setting */
206
-const struct setting syslog6_setting __setting ( SETTING_MISC ) = {
206
+const struct setting syslog6_setting __setting ( SETTING_MISC, syslog6 ) = {
207 207
 	.name = "syslog6",
208 208
 	.description = "Syslog server",
209 209
 	.tag = DHCPV6_LOG_SERVERS,

+ 1
- 1
src/net/validator.c Ver arquivo

@@ -121,7 +121,7 @@ static struct interface_descriptor validator_job_desc =
121 121
  */
122 122
 
123 123
 /** Cross-signed certificate source setting */
124
-const struct setting crosscert_setting __setting ( SETTING_CRYPTO ) = {
124
+const struct setting crosscert_setting __setting ( SETTING_CRYPTO, crosscert )={
125 125
 	.name = "crosscert",
126 126
 	.description = "Cross-signed certificate source",
127 127
 	.tag = DHCP_EB_CROSS_CERT,

+ 5
- 3
src/usr/autoboot.c Ver arquivo

@@ -59,7 +59,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
59 59
 #define CYAN	"\033[36m"
60 60
 
61 61
 /** The "scriptlet" setting */
62
-const struct setting scriptlet_setting __setting ( SETTING_MISC ) = {
62
+const struct setting scriptlet_setting __setting ( SETTING_MISC, scriptlet ) = {
63 63
 	.name = "scriptlet",
64 64
 	.description = "Boot scriptlet",
65 65
 	.tag = DHCP_EB_SCRIPTLET,
@@ -119,7 +119,8 @@ static struct uri * parse_next_server_and_filename ( struct in_addr next_server,
119 119
 }
120 120
 
121 121
 /** The "keep-san" setting */
122
-const struct setting keep_san_setting __setting ( SETTING_SANBOOT_EXTRA ) = {
122
+const struct setting keep_san_setting __setting ( SETTING_SANBOOT_EXTRA,
123
+						  keep-san ) = {
123 124
 	.name = "keep-san",
124 125
 	.description = "Preserve SAN connection",
125 126
 	.tag = DHCP_EB_KEEP_SAN,
@@ -127,7 +128,8 @@ const struct setting keep_san_setting __setting ( SETTING_SANBOOT_EXTRA ) = {
127 128
 };
128 129
 
129 130
 /** The "skip-san-boot" setting */
130
-const struct setting skip_san_boot_setting __setting ( SETTING_SANBOOT_EXTRA )={
131
+const struct setting skip_san_boot_setting __setting ( SETTING_SANBOOT_EXTRA,
132
+						       skip-san-boot ) = {
131 133
 	.name = "skip-san-boot",
132 134
 	.description = "Do not boot from SAN device",
133 135
 	.tag = DHCP_EB_SKIP_SAN_BOOT,

Carregando…
Cancelar
Salvar