projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drop -O0 for debug builds
[project/netifd.git]
/
system-linux.c
diff --git
a/system-linux.c
b/system-linux.c
index
f1acc19
..
f2f9660
100644
(file)
--- a/
system-linux.c
+++ b/
system-linux.c
@@
-9,6
+9,8
@@
#include <fcntl.h>
#include <netlink/msg.h>
#include <fcntl.h>
#include <netlink/msg.h>
+#include <netlink/attr.h>
+#include <netlink/socket.h>
#include <libubox/uloop.h>
#include "netifd.h"
#include <libubox/uloop.h>
#include "netifd.h"
@@
-57,11
+59,7
@@
int system_init(void)
nlmsg_free(m);
}
nlmsg_free(m);
}
-#ifdef NLA_PUT_DATA
rtnl_event.fd = nl_socket_get_fd(sock_rtnl_event);
rtnl_event.fd = nl_socket_get_fd(sock_rtnl_event);
-#else
- rtnl_event.fd = sock_rtnl_event->s_fd; // libnl-tiny hack...
-#endif
uloop_fd_add(&rtnl_event, ULOOP_READ | ULOOP_EDGE_TRIGGER);
}
uloop_fd_add(&rtnl_event, ULOOP_READ | ULOOP_EDGE_TRIGGER);
}
@@
-188,7
+186,8
@@
int system_if_down(struct device *dev)
int system_if_check(struct device *dev)
{
int system_if_check(struct device *dev)
{
- return -!(system_if_resolve(dev));
+ device_set_present(dev, (system_if_resolve(dev) >= 0));
+ return 0;
}
static int system_addr(struct device *dev, struct device_addr *addr, int cmd)
}
static int system_addr(struct device *dev, struct device_addr *addr, int cmd)