network: add debug log when conditions do not match system environment
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 Feb 2019 07:41:47 +0000 (16:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 26 Feb 2019 00:58:33 +0000 (09:58 +0900)
src/network/netdev/netdev.c

index 8d42e66..7d949fe 100644 (file)
@@ -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);