summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2015-06-11 17:01:39 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2015-06-11 17:01:39 +0200
commit9d1b6c8bcaef54e9a8b9174b969aa4d1c1a32d43 (patch)
tree6275db6994b6c416127d1380460692d8f2ae5931 /src
parent512b85af26a68a41a441e1b0489932a96a6f757a (diff)
parent78d298bbc57e412574ea35e6e66f562d97fd9ebc (diff)
Merge pull request #166 from zonque/kmod
kmod-setup: don't print warning on -ENOSYS
Diffstat (limited to 'src')
-rw-r--r--src/core/kmod-setup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index d956f9b190..f5584b6b14 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -117,10 +117,12 @@ int kmod_setup(void) {
log_info("Inserted module '%s'", kmod_module_get_name(mod));
else if (r == KMOD_PROBE_APPLY_BLACKLIST)
log_info("Module '%s' is blacklisted", kmod_module_get_name(mod));
- else
- log_full_errno((kmod_table[i].warn_if_unavailable || (r < 0 && r != -ENOENT)) ? LOG_WARNING : LOG_DEBUG,
- r,
+ else {
+ bool print_warning = kmod_table[i].warn_if_unavailable || (r < 0 && r != -ENOSYS);
+
+ log_full_errno(print_warning ? LOG_WARNING : LOG_DEBUG, r,
"Failed to insert module '%s': %m", kmod_module_get_name(mod));
+ }
kmod_module_unref(mod);
}