Path: utzoo!attcan!telly!eci386!clewis From: clewis@eci386.uucp (Chris Lewis) Newsgroups: comp.unix.wizards Subject: Re: RFS/NFS file detection - possible solution Message-ID: <1990Feb26.160518.21953@eci386.uucp> Date: 26 Feb 90 16:05:18 GMT References: <1990Feb22.222846.6656@eci386.uucp> <100210@convex.convex.com> Reply-To: clewis@eci386.UUCP (Chris Lewis) Organization: Elegant Communications Inc., Toronto, Canada Lines: 31 In article <100210@convex.convex.com> tchrist@convex.COM (Tom Christiansen) writes: > The teststat program fails to identify NFS files on Convex > systems. Here's the output from a C120 OS7.1: That's partially because my program was busted (the major should have been bmajor), and partially because I'm not really taking account of differing "major()" definitions. In your teststat output, given: > file: /usr/spool/globdata/aliases/tacunix dev: ffffff02 major: ff minor: 2 > I don't think /usr/spool/globdata/aliases/tacunix is a networked file Note that the major has bit 7 on, which it doesn't on the local filesystems. What I'm leaning towards is the following definitions: #if defined(locmajor) #undef locmajor #endif #define locmajor(x) (major(x)&0x7f) #define REMOTEFS(dev) (makedev(locmajor(dev),minor(dev)) != (dev)) Which should work on HPUX, AIX and now Convex, not to mention the other systems that Larry Wall mentioned, even where major() itself masks off the bit. Though, the 0x7f may have to be parameterized on some systems. -- Chris Lewis, Elegant Communications Inc, {uunet!attcan,utzoo}!lsuc!eci386!clewis Ferret mailing list: eci386!ferret-list, psroff mailing list: eci386!psroff-list