From a6779fecd953a2720c01ee8f9ca0bacffb4d7d29 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 21 Feb 2019 16:41:47 +0900 Subject: [PATCH] network: add debug log when conditions do not match system environment --- src/network/netdev/netdev.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c index 8d42e662f8a..7d949fe5bb9 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -669,12 +669,14 @@ int netdev_load_one(Manager *manager, const char *filename) { return r; /* skip out early if configuration does not match the environment */ - if (net_match_config(NULL, NULL, NULL, NULL, NULL, - netdev_raw->match_host, netdev_raw->match_virt, - netdev_raw->match_kernel_cmdline, netdev_raw->match_kernel_version, - netdev_raw->match_arch, - NULL, NULL, NULL, NULL, NULL) <= 0) + if (!net_match_config(NULL, NULL, NULL, NULL, NULL, + netdev_raw->match_host, netdev_raw->match_virt, + netdev_raw->match_kernel_cmdline, netdev_raw->match_kernel_version, + netdev_raw->match_arch, + NULL, NULL, NULL, NULL, NULL)) { + log_debug("%s: Conditions in the file do not match the system environment, skipping.", filename); return 0; + } if (netdev_raw->kind == _NETDEV_KIND_INVALID) { log_warning("NetDev has no Kind configured in %s. Ignoring", filename); -- 2.47.3