rename "active" to "available"
authorFelix Fietkau <nbd@openwrt.org>
Thu, 8 Sep 2011 07:13:06 +0000 (09:13 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 8 Sep 2011 07:13:56 +0000 (09:13 +0200)
interface.c
interface.h
ubus.c

index 031959ccb4a52e9c18c77acb52499b7e8f054f86..51e9e92ce34b756bd03c6aa3bbfe2ec3a47c1ee0 100644 (file)
@@ -150,10 +150,10 @@ interface_cb(struct device_user *dep, enum device_event ev)
                return;
        }
 
-       if (iface->active == new_state)
+       if (iface->available == new_state)
                return;
 
-       iface->active = new_state;
+       iface->available = new_state;
 
        if (new_state) {
                if (iface->autostart && !config_init)
@@ -303,7 +303,7 @@ interface_set_up(struct interface *iface)
 {
        iface->autostart = true;
 
-       if (!iface->active) {
+       if (!iface->available) {
                interface_add_error(iface, "interface", "NO_DEVICE", NULL, 0);
                return -1;
        }
@@ -329,7 +329,7 @@ interface_start_pending(void)
        struct interface *iface;
 
        list_for_each_entry(iface, &interfaces, list) {
-               if (iface->active && iface->autostart)
+               if (iface->available && iface->autostart)
                        interface_set_up(iface);
        }
 }
index 36bde4195c784e38892ed9ff3384f6699de04c89..020306c36c9c6d6705e94c5222a496d91df59d3a 100644 (file)
@@ -35,7 +35,7 @@ struct interface {
 
        char name[IFNAMSIZ];
 
-       bool active;
+       bool available;
        bool autostart;
 
        enum interface_state state;
diff --git a/ubus.c b/ubus.c
index 6eba0b07e8faa12739c54b010f0d85da17606166..c914cc5915b2a22dfd128256e5e9138eb11fffb8 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -154,7 +154,7 @@ netifd_handle_status(struct ubus_context *ctx, struct ubus_object *obj,
        blob_buf_init(&b, 0);
        blobmsg_add_u8(&b, "up", iface->state == IFS_UP);
        blobmsg_add_u8(&b, "pending", iface->state == IFS_SETUP);
-       blobmsg_add_u8(&b, "active", iface->active);
+       blobmsg_add_u8(&b, "available", iface->available);
        blobmsg_add_u8(&b, "autostart", iface->autostart);
        if (iface->main_dev.dev) {
                struct device *dev = iface->main_dev.dev;