From: Felix Fietkau Date: Thu, 6 Oct 2011 15:41:40 +0000 (+0200) Subject: only show the "Create new device.." message if there is no old device X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e443a041117d0d09e81a9797d205e5b70c481b15;p=oweals%2Fnetifd.git only show the "Create new device.." message if there is no old device --- diff --git a/device.c b/device.c index ac0954d..bceba62 100644 --- a/device.c +++ b/device.c @@ -424,7 +424,6 @@ device_create(const char *name, const struct device_type *type, struct device *odev = NULL, *dev; enum dev_change_type change; - D(DEVICE, "Create new device '%s' (%s)\n", name, type->name); config = config_memdup(config); if (!config) return NULL; @@ -452,7 +451,8 @@ device_create(const char *name, const struct device_type *type, device_delete(odev); break; } - } + } else + D(DEVICE, "Create new device '%s' (%s)\n", name, type->name); dev = type->create(config); if (!dev)