summaryrefslogtreecommitdiffhomepage
path: root/config.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-01-23 23:54:19 +0100
committerFelix Fietkau <nbd@openwrt.org>2015-01-23 23:54:19 +0100
commitb164619c069b01c57425f462cc8768c021c32f8b (patch)
treedfc3cfb65b5bb490177c87ef02195645a890110e /config.c
parent942aa06b7e8b74680b18022f7d002a8013b7bd5d (diff)
device: set dev->default_config to false for devices parsed from config
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/config.c b/config.c
index 7e2d1ed..90ec979 100644
--- a/config.c
+++ b/config.c
@@ -209,7 +209,9 @@ config_init_devices(void)
blob_buf_init(&b, 0);
uci_to_blob(&b, s, params);
if (devtype) {
- device_create(name, devtype, b.head);
+ dev = device_create(name, devtype, b.head);
+ if (!dev)
+ continue;
} else {
dev = device_get(name, 1);
if (!dev)
@@ -217,6 +219,7 @@ config_init_devices(void)
device_set_config(dev, dev->type, b.head);
}
+ dev->default_config = false;
}
}