networkd-link.c revision f579559b3a14c1f1ef96c372e7626c4733e6ef7d
/*-*- 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 "libudev-private.h"
#include "util.h"
int r;
if (!link)
return -ENOMEM;
if (ifindex <= 0)
return -EINVAL;
if (r < 0)
return r;
return 0;
}
if (!link)
return;
}
int r;
assert(m);
if (link)
return 0;
if (r < 0) {
return r;
}
if (r < 0)
return r == -ENOENT ? 0 : r;
if (r < 0)
return r;
return 0;
}
int r;
if (r < 0) {
log_error("Could not allocate RTM_NEWLINK message");
return r;
}
if (r < 0) {
return r;
}
log_info("Link is UP");
return 0;
}