Device numbers in a stat entry vs. the kernel i_node table
sjm
sjm at dayton.UUCP
Mon Sep 8 00:50:39 AEST 1986
In trying to port the ofiles program which was recently posted, to a
System V.2 release of Unix on a Tower/32, I was able to get every
thing to work EXECEPT: (There's always an execpt :-)
Ofiles gets the device number (st_dev) from a stat() of the file you
are looking for and compares it to the device number it gets from the
kernel inode table (sys/inode.h -> i_dev). These 2 numbers never match
even though the inode numbers themselves match and I am fairly
certain (95%) that they point to the same inodes (I checked
by simply removing the device number check, and keeping only the
inode number checking, and ofiles "worked" fine).
My question is this: Does anyone have an idea of why these two
numbers are different on System V? Should they be? Does one maybe
(somehow) point in to a mount table or something? Also, of course,
how can I relate the two together?
Thanks in advance!
--
Steven J. McDowall
Dayton-Hudson Dept. Store. Co. UUCP: ihnp4!rosevax!dayton!sjm
700 on the Mall ATT: 1 612 375 2816
Mpls, Mn. 55408
More information about the Comp.unix.wizards
mailing list