networkd-network.c revision f882c247ad59776c3a7753bb963c1f8e2386cb79
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2013 Tom Gundersen <teg@jklm.no>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "networkd.h"
#include "net-util.h"
#include "path-util.h"
#include "conf-files.h"
#include "conf-parser.h"
int r;
if (!file) {
return 0;
else
return errno;
}
if (!network)
return log_oom();
(void*) network_gperf_lookup, false, false, network);
if (r < 0) {
return r;
} else
return log_oom();
return 0;
}
char **files, **f;
int r;
/* update timestamp */
if (r < 0) {
return r;
}
STRV_FOREACH_BACKWARDS(f, files) {
r = network_load_one(manager, *f);
if (r < 0)
return r;
}
return 0;
}
}
if (!network)
return;
}
if (network_should_reload(manager))
log_debug("Network file %s applies to link %s",
return 0;
}
}
return -ENOENT;
}
int r;
log_info("Network '%s' being applied to link '%u'",
r = link_configure(link);
if (r < 0)
return r;
return 0;
}