networkd-wait-online-link.c revision a1e58e8ee1c84b633d6d6d651d5328d4dd4eba5b
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2014 Lennart Poettering
Copyright 2014 Tom Gundersen
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 "sd-network.h"
#include "networkd-wait-online-link.h"
int r;
assert(m);
if (r < 0)
return r;
if (r < 0)
return r;
if (!l)
return -ENOMEM;
l->manager = m;
if (!l->ifname)
return -ENOMEM;
if (r < 0)
return r;
if (r < 0)
return r;
if (ret)
*ret = l;
l = NULL;
return 0;
}
if (!l)
return NULL;
if (l->manager) {
}
free(l);
return NULL;
}
const char *ifname;
int r;
assert(l);
assert(m);
r = sd_rtnl_message_link_get_flags(m, &l->flags);
if (r < 0)
return r;
if (r < 0)
return r;
char *new_ifname;
if (!new_ifname)
return -ENOMEM;
l->ifname = new_ifname;
if (r < 0)
return r;
}
return 0;
}
int link_update_monitor(Link *l) {
assert(l);
return 0;
}