From ba4b80512c3c8e777db6b536f281e0bc74c054ad Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 6 Oct 2011 01:13:34 +0200 Subject: [PATCH] add debug messages for device config changes --- device.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/device.c b/device.c index c6765b0..b40f661 100644 --- 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: + 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); } - /* fall through */ + free(config); + return odev; case DEV_CONFIG_NO_CHANGE: + D(DEVICE, "Device '%s': no configuration change\n", odev->ifname); free(config); return odev; case DEV_CONFIG_RECREATE: + D(DEVICE, "Device '%s': recreate device\n", odev->ifname); break; } } -- 2.25.1