projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cb06c3
)
when specifying hotplug devices that already have existing configured devices, set...
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 5 Jul 2012 18:32:07 +0000
(20:32 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 5 Jul 2012 18:32:07 +0000
(20:32 +0200)
device.c
patch
|
blob
|
history
diff --git
a/device.c
b/device.c
index 80881d29edd4a47e1c90bfff4da363586538de14..f0361d930f2fc1dca03c1f00cb4aa5df9aa9ea47 100644
(file)
--- a/
device.c
+++ b/
device.c
@@
-318,8
+318,13
@@
device_get(const char *name, int create)
return device_alias_get(name + 1);
dev = avl_find_element(&devices, name, dev, avl);
- if (dev)
+ if (dev) {
+ if (create > 1 && !dev->external) {
+ dev->external = true;
+ device_set_present(dev, true);
+ }
return dev;
+ }
if (!create)
return NULL;