projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd51d94
)
add debug messages for device config changes
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 5 Oct 2011 23:13:34 +0000
(
01:13
+0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 5 Oct 2011 23:13:34 +0000
(
01:13
+0200)
device.c
patch
|
blob
|
history
diff --git
a/device.c
b/device.c
index
c6765b0
..
b40f661
100644
(file)
--- a/
device.c
+++ b/
device.c
@@
-377,17
+377,21
@@
device_create(const char *name, const struct device_type *type,
change = device_check_config(odev, config);
switch (change) {
case DEV_CONFIG_APPLIED:
change = device_check_config(odev, config);
switch (change) {
case DEV_CONFIG_APPLIED:
+ D(DEVICE, "Device '%s': config applied\n", odev->ifname);
free(odev->config);
odev->config = config;
if (odev->present) {
device_set_present(odev, false);
device_set_present(odev, true);
}
free(odev->config);
odev->config = config;
if (odev->present) {
device_set_present(odev, false);
device_set_present(odev, true);
}
- /* fall through */
+ free(config);
+ return odev;
case DEV_CONFIG_NO_CHANGE:
case DEV_CONFIG_NO_CHANGE:
+ D(DEVICE, "Device '%s': no configuration change\n", odev->ifname);
free(config);
return odev;
case DEV_CONFIG_RECREATE:
free(config);
return odev;
case DEV_CONFIG_RECREATE:
+ D(DEVICE, "Device '%s': recreate device\n", odev->ifname);
break;
}
}
break;
}
}