proc fs / inode (?) problem

Stephan Meyer (Stephan.Meyer@pobox.com)
Wed, 19 Nov 1997 13:03:02 +0100 (MET)


While trying to add a directory in the proc fs for msr support, I
encountered this error (kernel 2.1.65):

I added a directory "msr".
In the directory I put a test file "test".

I used arch/i386/mca.c as a howto.

Now, /proc/msr/test has inode 331 assigned:
--- stat /proc/msr/test ---
File: "/proc/msr/test"
Size: 0 Filetype: Regular File
Mode: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/
root)
Device: 0,1 Inode: 331 Links: 1
Access: Wed Nov 19 13:01:23 1997(00000.00:00:01)
Modify: Wed Nov 19 13:01:23 1997(00000.00:00:01)
Change: Wed Nov 19 13:01:23 1997(00000.00:00:01)
---------------------------

Doing "cat /proc/msr/test" gives:
--------------
cat: /proc/msr/test: Bad file number
--------------
That's because inode "1" (!!) is requested (I added some debug code).
Why is that???

Has the proc fs code changed and mca.c wasn't updated?

Thanks in advance!

- Stephan

------------------------------------------------
Stephan.Meyer@pobox..com
meyerst@informatik.uni-muenchen.de
http://pobox.com/~stephan.meyer/
2A 64 F0 73 02 91 10 FC 18 CC 83 1E E2 2C 7E 79

So what would an angel say
The devil wants to know