diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-08-08 13:54:19 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-08-08 16:28:13 +0800 |
commit | 2b41985dde73e71daad90c36fa5d06c199da3ae1 (patch) | |
tree | 1996c9afb30c85f427977edffcd40352cfaf8ff0 /lib/pb-config/storage-test.c | |
parent | d6166b471a9356355ed16747de3c0febd4b8cd3e (diff) | |
download | talos-petitboot-2b41985dde73e71daad90c36fa5d06c199da3ae1.tar.gz talos-petitboot-2b41985dde73e71daad90c36fa5d06c199da3ae1.zip |
config: Split interface configuration from network configuration
This change moves the interface configuration into its own 'struct
interface_config'. We also remove the _config suffix from the network
and interface members.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/pb-config/storage-test.c')
-rw-r--r-- | lib/pb-config/storage-test.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/pb-config/storage-test.c b/lib/pb-config/storage-test.c index ba4e952..bdb1d0d 100644 --- a/lib/pb-config/storage-test.c +++ b/lib/pb-config/storage-test.c @@ -7,12 +7,12 @@ #include "pb-config.h" #include "storage.h" -struct network_config net1 = { +struct interface_config net1 = { .hwaddr = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }, .method = CONFIG_METHOD_DHCP, }; -struct network_config net2 = { +struct interface_config net2 = { .hwaddr = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x56 }, .method = CONFIG_METHOD_STATIC, .static_config = { @@ -21,14 +21,16 @@ struct network_config net2 = { }, }; -struct network_config *network_configs[] = { &net1, &net2 }; +struct interface_config *interface_configs[] = { &net1, &net2 }; #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) struct config test_config = { .autoboot_enabled = true, - .network_configs = network_configs, - .n_network_configs = ARRAY_SIZE(network_configs), + .network = { + .interfaces = interface_configs, + .n_interfaces = ARRAY_SIZE(interface_configs), + } }; struct test_storage { |