Re: [PATCH] towards a /proc-less user space

From: Erik Andersen (andersen@xmission.com)
Date: Wed Mar 08 2000 - 18:24:01 EST


On Wed Mar 08, 2000 at 10:51:27PM +0000, Matthew Kirkwood wrote:
> On Wed, 8 Mar 2000, Erik Andersen wrote:
>
> > > And devmodules is not necessary even on a normal system. lsmod provides the
> > > same info and is not using proc at all.
> >
> > Umm...
> >
> > [andersen@slag andersen]$ strace lsmod 2>&1 | grep proc
> > open("/proc/modules", O_RDONLY) = 3
> > [andersen@slag andersen]$ dlocate lsmod | grep bin
> > modutils: /sbin/lsmod
>
> matthew@jim:~$ strace /sbin/lsmod 2>&1 | grep proc
> matthew@jim:~$ rpm -qf /sbin/lsmod
> modutils-2.1.121-14

[andersen@slag andersen]$ dpkg -l modutils strace | tail -n2
ii modutils 2.3.9-3 Linux module utilities.
ii strace 4.2-4 A system call tracer.

I just downloaded the source to modutils-2.1.121,
modutils-2.2.2-pre8, and modutils-2.3.9 and every
one of them has:

    open("/proc/modules", O_RDONLY)

in insmod/lsmod.c along with the comment

    /* We've got no other option but to read /proc. */

I don't know where you got your strace, but I suspect it is broken. If it is
indeed working, I would dearly love to see the interface lsmod used to get the
kernel module information.

 -Erik

--
Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:14 EST