Re: kmod (Version 5)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sven

On Thu, Mar 1, 2012 at 6:16 AM, Sven Anders <anders@xxxxxxxxxx> wrote:
> Hello!
>
> I want to use you new kmod (library) together with systemd.
> We have a system with an own kernel using modules but we disabled the unload
> function in the kernel.
>
> If we make an "lsmod" we'll get some errors, which are only caused, because
> unload is disabled. So these "errors" are no real errors.
>
> Example:
>
> # lsmod
> Module                  Size  Used by
> libkmod: kmod_module_get_refcnt: could not open '/sys/module/usbnet/refcnt': No such file or directory
> usbnet                 21576  -2
> libkmod: kmod_module_get_refcnt: could not open '/sys/module/ip6table_mangle/refcnt': No such file or directory
> ip6table_mangle        12383  -2
> libkmod: kmod_module_get_refcnt: could not open '/sys/module/ipt_ECN/refcnt': No such file or directory
> ipt_ECN                12357  -2
> libkmod: kmod_module_get_refcnt: could not open '/sys/module/xt_DSCP/refcnt': No such file or directory
> xt_DSCP                12431  -2
> ...
> ...
> ...
>
> I attached a small patch. But maybe you could solve this problem more elegant and in a more compatible
> way (to the old tools).

Thanks for the patch (though when sending patches please use the git
version since most likely a patch against previous version will not
apply, which was your case.

About the patch,  the only possible error here is file not existing
due to kernel not having support to unload modules (as you said) or
/sys not mounted (that we don't care). Therefore, it would be better
to change ERR to DBG instead of checking what was the error.

I'm doing this now in git version.

Thanks
Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux