2009-07-24 19:42:32

by Tomas Carnecky

[permalink] [raw]
Subject: Show module version sysfs file for built-in modules?

Some userspace tools check /sys/modules/XYZ/version to determine
whether the required module is available and the version compatible
with the userspace tool. But that sysfs file is not shown when the
module is built into the kernel (as opposed being a loadable module).
Is there a reason for that behavior? Or is there another way for
userspace to check the presence and version of a module?
The userspace tool in question here is the open-iscsi daemon (iscsid)
which checks /sys/modules/scsi_transport_iscsi/version and refuses to
start if that file doesn't exist.

thanks
tom


2009-07-29 05:35:45

by Greg KH

[permalink] [raw]
Subject: Re: Show module version sysfs file for built-in modules?

On Fri, Jul 24, 2009 at 09:08:51PM +0200, Tomas Carnecky wrote:
> Some userspace tools check /sys/modules/XYZ/version to determine
> whether the required module is available and the version compatible
> with the userspace tool. But that sysfs file is not shown when the
> module is built into the kernel (as opposed being a loadable module).
> Is there a reason for that behavior? Or is there another way for
> userspace to check the presence and version of a module?
> The userspace tool in question here is the open-iscsi daemon (iscsid)
> which checks /sys/modules/scsi_transport_iscsi/version and refuses to
> start if that file doesn't exist.

A patch to fix this would probably be gladly accepted.

thanks,

greg k-h

2009-07-29 18:40:40

by Roland

[permalink] [raw]
Subject: Re: Show module version sysfs file for built-in modules?

what about this ?

neoware:/sys/module/8139too # cat /sys/module/8139too/version
0.9.28

neoware:/sys/module/8139too # modinfo 8139too |grep "^version:"
version: 0.9.28

the latter should work completely without consulting the kernel for that information.

regards
roland

>List: linux-kernel
>Subject: Show module version sysfs file for built-in modules?
>From: Tomas Carnecky <tom () dbservice ! com>
>Date: 2009-07-24 19:08:51
>Message-ID: 5A77D882-B628-4105-85A3-ADE423BBD9F8 () dbservice ! com
>[Download message RAW]
>
>Some userspace tools check /sys/modules/XYZ/version to determine
>whether the required module is available and the version compatible
>with the userspace tool. But that sysfs file is not shown when the
>module is built into the kernel (as opposed being a loadable module).
>Is there a reason for that behavior? Or is there another way for
>userspace to check the presence and version of a module?
>The userspace tool in question here is the open-iscsi daemon (iscsid)
vwhich checks /sys/modules/scsi_transport_iscsi/version and refuses to
>start if that file doesn't exist.
>
>thanks
>tom

________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
f?r nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/

2009-07-29 19:16:15

by Alan Jenkins

[permalink] [raw]
Subject: Re: Show module version sysfs file for built-in modules?

On 7/29/09, [email protected] <[email protected]> wrote:
> what about this ?
>
> neoware:/sys/module/8139too # cat /sys/module/8139too/version
> 0.9.28
>
> neoware:/sys/module/8139too # modinfo 8139too |grep "^version:"
> version: 0.9.28
>
> the latter should work completely without consulting the kernel for that
> information.
>
> regards
> roland
>
>>List: linux-kernel
>>Subject: Show module version sysfs file for built-in modules?

modinfo clearly won't work for *built in* drivers. Apparently
/sys/module/$MODULE/version doesn't work for built in modules either.
Hence this proposal.

Alan

2009-07-29 21:48:34

by Roland

[permalink] [raw]
Subject: Re: Show module version sysfs file for built-in modules?

pardon - that was dumb.
must have read over that built-in.

indeed, this is a missing feature.
there are even modules/drivers which don?t spit any line in dmesg when they are initialized - builtin or not.
there is a LOT of different behaviour in module load/init and i`d welcome if module initialization messages including version information would follow a more standard way. many modules don`t even have a version.

regards
roland


> -----Urspr?ngliche Nachricht-----
> Von: "Alan Jenkins" <[email protected]>
> Gesendet: 29.07.09 21:10:24
> An: [email protected]
> CC: Tomas Carnecky <[email protected]>, [email protected]
> Betreff: Re: Show module version sysfs file for built-in modules?


> On 7/29/09, [email protected] <[email protected]> wrote:
> > what about this ?
> >
> > neoware:/sys/module/8139too # cat /sys/module/8139too/version
> > 0.9.28
> >
> > neoware:/sys/module/8139too # modinfo 8139too |grep "^version:"
> > version: 0.9.28
> >
> > the latter should work completely without consulting the kernel for that
> > information.
> >
> > regards
> > roland
> >
> >>List: linux-kernel
> >>Subject: Show module version sysfs file for built-in modules?
>
> modinfo clearly won't work for *built in* drivers. Apparently
> /sys/module/$MODULE/version doesn't work for built in modules either.
> Hence this proposal.
>
> Alan
>


______________________________________________________
GRATIS f?r alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de