summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-08 09:13:06 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-09-08 09:13:56 +0200
commit8ddaf5d7688b14590f283b2ebb81f78326fb39fd (patch)
treed4192704c0ff3b43a9e6fbe0d69424d5f3853a02
parentd24673d0f2fbb5b8a38f3e3fec9b06ce9a3dec3f (diff)
rename "active" to "available"
-rw-r--r--interface.c8
-rw-r--r--interface.h2
-rw-r--r--ubus.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/interface.c b/interface.c
index 031959c..51e9e92 100644
--- a/interface.c
+++ b/interface.c
@@ -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);
}
}
diff --git a/interface.h b/interface.h
index 36bde41..020306c 100644
--- a/interface.h
+++ b/interface.h
@@ -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 6eba0b0..c914cc5 100644
--- 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;