From: Felix Fietkau Date: Wed, 5 Oct 2011 23:13:34 +0000 (+0200) Subject: add debug messages for device config changes X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ba4b80512c3c8e777db6b536f281e0bc74c054ad;p=oweals%2Fnetifd.git add debug messages for device config changes --- 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; } }