From b164619c069b01c57425f462cc8768c021c32f8b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 23 Jan 2015 23:54:19 +0100 Subject: [PATCH] device: set dev->default_config to false for devices parsed from config Signed-off-by: Felix Fietkau --- config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } } -- 2.25.1