Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!caip!dayton!sjm From: sjm@dayton.UUCP (sjm) Newsgroups: net.unix,net.unix-wizards Subject: Device numbers in a stat entry vs. the kernel i_node table Message-ID: <186@dayton.UUCP> Date: Sun, 7-Sep-86 10:50:39 EDT Article-I.D.: dayton.186 Posted: Sun Sep 7 10:50:39 1986 Date-Received: Sun, 7-Sep-86 20:18:24 EDT Reply-To: sjm@dayton.UUCP (Steven J. McDowall) Organization: Dayton-Hudson Dept. Store Co., Mpls., Mn Lines: 24 Keywords: stat inode kernel Xref: mnetor net.unix:5393 net.unix-wizards:7803 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