From: Yu Watanabe Date: Thu, 21 Feb 2019 07:41:47 +0000 (+0900) Subject: network: add debug log when conditions do not match system environment X-Git-Tag: v242-rc1~246^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6779fecd953a2720c01ee8f9ca0bacffb4d7d29;p=thirdparty%2Fsystemd.git network: add debug log when conditions do not match system environment --- 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);