X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=system-dummy.c;h=f2e3aed94d9feacf13d8901581304b8dd953e0c2;hb=f5ca090c260a74fd3576f79ffb8799e8c20e3878;hp=d518d6fb0af0bab47920286bf2b5c71d5ddadd79;hpb=ca3f00d45e72c4b28b2ce39afc9543fa2f225020;p=project%2Fnetifd.git diff --git a/system-dummy.c b/system-dummy.c index d518d6f..f2e3aed 100644 --- a/system-dummy.c +++ b/system-dummy.c @@ -79,7 +79,24 @@ int system_if_check(struct device *dev) return 0; } -int system_if_dump_stats(struct device *dev, struct blob_buf *b) +struct device * +system_if_get_parent(struct device *dev) +{ + if (!strcmp(dev->ifname, "eth0")) + return device_get("eth1", true); + + return NULL; +} + +int +system_if_dump_info(struct device *dev, struct blob_buf *b) +{ + blobmsg_add_u8(b, "link", dev->present); + return 0; +} + +int +system_if_dump_stats(struct device *dev, struct blob_buf *b) { return 0; }