Sync ubus familly tools.

This commit is contained in:
2017-04-08 21:34:59 +02:00
parent 0e9f199c9c
commit 63d0813f93
57 changed files with 413 additions and 564 deletions

View File

@@ -58,7 +58,6 @@ static const struct blobmsg_policy dev_attrs[__DEV_ATTR_MAX] = {
[DEV_ATTR_MULTICAST] = { .name ="multicast", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_LEARNING] = { .name ="learning", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_UNICAST_FLOOD] = { .name ="unicast_flood", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_SENDREDIRECTS] = { .name = "sendredirects", .type = BLOBMSG_TYPE_BOOL },
};
const struct uci_blob_param_list device_attr_list = {
@@ -226,8 +225,6 @@ device_merge_settings(struct device *dev, struct device_settings *n)
n->multicast_fast_leave = s->multicast_fast_leave;
n->learning = s->learning;
n->unicast_flood = s->unicast_flood;
n->sendredirects = s->flags & DEV_OPT_SENDREDIRECTS ?
s->sendredirects : os->sendredirects;
n->flags = s->flags | os->flags | os->valid_flags;
}
@@ -366,11 +363,6 @@ device_init_settings(struct device *dev, struct blob_attr **tb)
s->flags |= DEV_OPT_UNICAST_FLOOD;
}
if ((cur = tb[DEV_ATTR_SENDREDIRECTS])) {
s->sendredirects = blobmsg_get_bool(cur);
s->flags |= DEV_OPT_SENDREDIRECTS;
}
device_set_disabled(dev, disabled);
}
@@ -1058,8 +1050,6 @@ device_dump_status(struct blob_buf *b, struct device *dev)
blobmsg_add_u8(b, "learning", st.learning);
if (st.flags & DEV_OPT_UNICAST_FLOOD)
blobmsg_add_u8(b, "unicast_flood", st.unicast_flood);
if (st.flags & DEV_OPT_SENDREDIRECTS)
blobmsg_add_u8(b, "sendredirects", st.sendredirects);
}
s = blobmsg_open_table(b, "statistics");