X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fnetwork.c;h=910649eeb742690851a11fd6c51bf17fb9d7c07f;hp=23bf1ee190e13070195d0a3d09cc8c2eda811a11;hb=6557f07325409d769f414035cca05a563418e729;hpb=9f895134427d9a72be3d296e596c0360014a9753 diff --git a/discover/network.c b/discover/network.c index 23bf1ee..910649e 100644 --- a/discover/network.c +++ b/discover/network.c @@ -53,7 +53,7 @@ struct network { bool dry_run; }; -static const struct network_config *find_config_by_hwaddr( +static const struct interface_config *find_config_by_hwaddr( uint8_t *hwaddr) { const struct config *config; @@ -63,11 +63,11 @@ static const struct network_config *find_config_by_hwaddr( if (!config) return NULL; - for (i = 0; i < config->n_network_configs; i++) { - struct network_config *netconf = config->network_configs[i]; + for (i = 0; i < config->network.n_interfaces; i++) { + struct interface_config *ifconf = config->network.interfaces[i]; - if (!memcmp(netconf->hwaddr, hwaddr, HWADDR_SIZE)) - return netconf; + if (!memcmp(ifconf->hwaddr, hwaddr, HWADDR_SIZE)) + return ifconf; } return NULL; @@ -191,7 +191,7 @@ static void configure_interface_dhcp(struct network *network, static void configure_interface_static(struct network *network, struct interface *interface, - const struct network_config *config) + const struct interface_config *config) { const char *addr_argv[] = { pb_system_apps.ip, @@ -242,7 +242,7 @@ static void configure_interface_static(struct network *network, static void configure_interface(struct network *network, struct interface *interface, bool up, bool link) { - const struct network_config *config = NULL; + const struct interface_config *config = NULL; if (interface->state == IFSTATE_IGNORED) return;