Subject: st_dev for NFS files/dirs.
To: None <current-users@NetBSD.ORG>
From: Simon J. Gerraty <sjg@zen.void.oz.au>
List: current-users
Date: 09/20/1995 23:10:56
Sorry if this is a dumb question...

Is there anyway of reliably determining from st_dev whether the device
is local or not?

Ie. can one avoid the need to to a statfs and compare the f_fstypename
if one is checking for local or not.

The reason I'm chasing this is that one of my old backup scripts is in
perl and its notion of checking for nfs is ($dev < 0) which is not
true. 

So can some bit manipulation of st_dev reveal the truth or must one
do a statfs().

I recal when porting the Linux NFS server to *BSD and SunOS that
st_dev's major number appeared to have a consistent value, but I'm now
seeing different results here so perhaps that whole theory was bogus.

--sjg