networkd: rename Address and Route list fields

This commit is contained in:
Tom Gundersen 2014-05-15 20:10:33 +02:00
parent 15a224e06c
commit 3d3d425547
5 changed files with 10 additions and 10 deletions

View File

@ -59,7 +59,7 @@ int address_new_static(Network *network, unsigned section, Address **ret) {
address->network = network;
LIST_PREPEND(static_addresses, network->static_addresses, address);
LIST_PREPEND(addresses, network->static_addresses, address);
if (section) {
address->section = section;
@ -92,7 +92,7 @@ void address_free(Address *address) {
return;
if (address->network) {
LIST_REMOVE(static_addresses, address->network->static_addresses, address);
LIST_REMOVE(addresses, address->network->static_addresses, address);
if (address->section)
hashmap_remove(address->network->addresses_by_section,

View File

@ -291,7 +291,7 @@ static int link_enter_set_routes(Link *link) {
log_debug_link(link, "setting routes");
LIST_FOREACH(static_routes, rt, link->network->static_routes) {
LIST_FOREACH(routes, rt, link->network->static_routes) {
r = route_configure(rt, link, &route_handler);
if (r < 0) {
log_warning_link(link,
@ -487,7 +487,7 @@ static int link_enter_set_addresses(Link *link) {
log_debug_link(link, "setting addresses");
LIST_FOREACH(static_addresses, ad, link->network->static_addresses) {
LIST_FOREACH(addresses, ad, link->network->static_addresses) {
r = address_configure(ad, link, &address_handler);
if (r < 0) {
log_warning_link(link,

View File

@ -98,7 +98,7 @@ static int network_load_one(Manager *manager, const char *filename) {
LIST_PREPEND(networks, manager->networks, network);
LIST_FOREACH(static_routes, route, network->static_routes) {
LIST_FOREACH(routes, route, network->static_routes) {
if (!route->family) {
log_warning("Route section without Gateway field configured in %s. "
"Ignoring", filename);
@ -106,7 +106,7 @@ static int network_load_one(Manager *manager, const char *filename) {
}
}
LIST_FOREACH(static_addresses, address, network->static_addresses) {
LIST_FOREACH(addresses, address, network->static_addresses) {
if (!address->family) {
log_warning("Address section without Address field configured in %s. "
"Ignoring", filename);

View File

@ -52,7 +52,7 @@ int route_new_static(Network *network, unsigned section, Route **ret) {
route->network = network;
LIST_PREPEND(static_routes, network->static_routes, route);
LIST_PREPEND(routes, network->static_routes, route);
if (section) {
route->section = section;
@ -86,7 +86,7 @@ void route_free(Route *route) {
return;
if (route->network) {
LIST_REMOVE(static_routes, route->network->static_routes, route);
LIST_REMOVE(routes, route->network->static_routes, route);
if (route->section)
hashmap_remove(route->network->routes_by_section,

View File

@ -172,7 +172,7 @@ struct Address {
struct in6_addr in6;
} in_addr;
LIST_FIELDS(Address, static_addresses);
LIST_FIELDS(Address, addresses);
};
struct Route {
@ -194,7 +194,7 @@ struct Route {
struct in6_addr in6;
} dst_addr;
LIST_FIELDS(Route, static_routes);
LIST_FIELDS(Route, routes);
};
typedef enum LinkState {