Hi.  I'm trying to find a bulletproof way to tell whether a given file
is mounted on a non-local filesystem.  I've been focussing on the
device number returned by stat(2), for which I have found empirically
on the SunOS and Solaris systems I have tested is:

0 or large number for local filesystem;
1 for AFS;
<0 for NFS;

and so if this investigation were actually borne out across all
platforms, all machines, my test would be

        if (st_dev == 0 | st_dev > 1)
                # local filesystem
        else
                # non-local filesystem

But I haven't been able to find any basis for such a leap of faith.
Does anyone have an answer handy?

Peter J. Scott, Member of Technical Staff    |   [EMAIL PROTECTED]
Jet Propulsion Laboratory,  NASA/Caltech     |   EIS Project

Reply via email to