]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Downgrade log message: refcnt file may not exist
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 1 Mar 2012 17:04:29 +0000 (14:04 -0300)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 1 Mar 2012 17:04:29 +0000 (14:04 -0300)
If kernel doesn't have support to unload modules,
/sys/module/<modname>/refcnt will not exist and that's ok.

Reported by: Sven Anders <anders@anduras.de>

libkmod/libkmod-module.c

index d9934a37e0ff6e8ea34dcb37aa0da483b79fe650..199dc8d714f119da990e44bfbc533407f0fa6424 100644 (file)
@@ -1749,7 +1749,7 @@ KMOD_EXPORT int kmod_module_get_refcnt(const struct kmod_module *mod)
        fd = open(path, O_RDONLY|O_CLOEXEC);
        if (fd < 0) {
                err = -errno;
-               ERR(mod->ctx, "could not open '%s': %s\n",
+               DBG(mod->ctx, "could not open '%s': %s\n",
                        path, strerror(errno));
                return err;
        }