The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Does /sys/module/foo reflect external module name?
@ 2006-01-29 16:14 Andrey Borzenkov
  2006-01-29 20:26 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2006-01-29 16:14 UTC (permalink / raw)
  To: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is it correct that /sys/module lists module *file* names (sans -_ confusion)? 
Is it possible to find out if module is built in or truly external? The goal 
is to automate initrd build by walking from /dev/root up and pulling in all 
modules. Now missing module may mean that it is built in or that it is really 
missing :) In my case:

{pts/1}% for i in /sys/module/*
for> do
for> grep -q ${i:t} /proc/modules || echo $i
for> done
/sys/module/8250
/sys/module/i8042
/sys/module/md_mod
/sys/module/psmouse
/sys/module/tcp_bic
{pts/1}% for i in $(lsmod | awk '{print $1}')
do
[[ -d /sys/module/$i ]] || echo $i
done
Module

so it looks quite reliable up to built in modules. Is there any information 
that could be exported in sysfs (like "builtin" == 0|1)?

TIA

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD3On4R6LMutpd94wRAiAxAJ9859hlkCu9BpTmry+82fuCDeJoJQCfQ5cx
DTOPjNg3P6n8zyH2rthS4yE=
=D+H5
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Does /sys/module/foo reflect external module name?
  2006-01-29 16:14 Does /sys/module/foo reflect external module name? Andrey Borzenkov
@ 2006-01-29 20:26 ` Greg KH
  2006-01-30  4:05   ` Andrey Borzenkov
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2006-01-29 20:26 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: linux-kernel

On Sun, Jan 29, 2006 at 07:14:47PM +0300, Andrey Borzenkov wrote:
> Is it correct that /sys/module lists module *file* names (sans -_ confusion)? 
> Is it possible to find out if module is built in or truly external? The goal 
> is to automate initrd build by walking from /dev/root up and pulling in all 
> modules. Now missing module may mean that it is built in or that it is really 
> missing :) In my case:
> 
> {pts/1}% for i in /sys/module/*
> for> do
> for> grep -q ${i:t} /proc/modules || echo $i
> for> done
> /sys/module/8250
> /sys/module/i8042
> /sys/module/md_mod
> /sys/module/psmouse
> /sys/module/tcp_bic
> {pts/1}% for i in $(lsmod | awk '{print $1}')
> do
> [[ -d /sys/module/$i ]] || echo $i
> done
> Module
> 
> so it looks quite reliable up to built in modules. Is there any information 
> that could be exported in sysfs (like "builtin" == 0|1)?

What would that be needed for?  You can always just compare the list
with /proc/modules, right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Does /sys/module/foo reflect external module name?
  2006-01-29 20:26 ` Greg KH
@ 2006-01-30  4:05   ` Andrey Borzenkov
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2006-01-30  4:05 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 29 January 2006 23:26, Greg KH wrote:
>
> What would that be needed for?  You can always just compare the list
> with /proc/modules, right?
>

right

> thanks,
>

thanks to you :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD3ZCZR6LMutpd94wRAiHfAKCbQzRonvgpAYkvKq1yTzWAQD/1MACgoy6D
mg0lJ2j+N06iJWAW7lm2CXw=
=k7HJ
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-30  4:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-29 16:14 Does /sys/module/foo reflect external module name? Andrey Borzenkov
2006-01-29 20:26 ` Greg KH
2006-01-30  4:05   ` Andrey Borzenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox