diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-10-19 17:30:04 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-10-19 17:30:04 +0200 |
commit | 65963f0ad2207b55dc7715015839b59b58855a67 (patch) | |
tree | c6b7cbc6afce934627f85ee25e7c1bdb560414cf /interface.c | |
parent | 566af724dad393fa127e07469dcc9ade62bd3a75 (diff) |
interface: remove "dynamic" argument for interface_init, add the interface_set_dynamic function instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/interface.c b/interface.c index 698fedb..18322d7 100644 --- a/interface.c +++ b/interface.c @@ -538,7 +538,7 @@ void interface_set_proto_state(struct interface *iface, struct interface_proto_s void interface_init(struct interface *iface, const char *name, - struct blob_attr *config, bool dynamic) + struct blob_attr *config) { struct blob_attr *tb[IFACE_ATTR_MAX]; struct blob_attr *cur; @@ -610,10 +610,12 @@ interface_init(struct interface *iface, const char *name, iface->proto_ip.no_delegation = !blobmsg_get_bool_default(tb[IFACE_ATTR_DELEGATE], true); iface->config_autostart = iface->autostart; - iface->dynamic = dynamic; +} - if (iface->dynamic) - iface->node.version = -1; // Don't delete on reload +void interface_set_dynamic(struct interface *iface) +{ + iface->dynamic = true; + iface->node.version = -1; // Don't delete on reload } static bool __interface_add(struct interface *iface, struct blob_attr *config, bool alias) |