Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!topaz!husc6!panda!genrad!decvax!decwrl!pyramid!gould9!ncr-sd!ncrcae!sauron!wescott From: wescott@sauron.UUCP Newsgroups: net.unix,net.unix-wizards Subject: Re: Device numbers in a stat entry vs. the kernel i_node table Message-ID: <720@sauron.UUCP> Date: Mon, 8-Sep-86 18:24:07 EDT Article-I.D.: sauron.720 Posted: Mon Sep 8 18:24:07 1986 Date-Received: Wed, 10-Sep-86 20:15:20 EDT References: <186@dayton.UUCP> Reply-To: wescott@sauron.UUCP (Mike Wescott) Organization: NCR Corp., Advanced System Development, Columbia, SC Lines: 24 Keywords: stat inode kernel Xref: mnetor net.unix:5435 net.unix-wizards:7839 In article <186@dayton.UUCP> sjm@dayton.UUCP (Steven J. McDowall) writes: > In trying to port the ofiles program which was recently posted, to a > System V.2 release of Unix on a Tower/32. > ... > 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 > ... > 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? st_dev == brdev(i_dev) where brdev is a macro defined in . There are some bits masked off of i_dev which are used to indicate whether the filesystem uses 1024-byte blocks or 512-byte blocks. i_dev should be something like 0x2204 while st_dev would be 0x0204. -- -Mike Wescott ncrcae!wescott