add dummy code for testing system_if_get_parent()
[project/netifd.git] / system-dummy.c
index d518d6f..09d1806 100644 (file)
@@ -79,6 +79,15 @@ int system_if_check(struct device *dev)
        return 0;
 }
 
+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_stats(struct device *dev, struct blob_buf *b)
 {
        return 0;