On 8/4/2018 12:40 AM, Ken Hornstein wrote:
>> is there an easy  way to check in C (under linux) whether a directory
>> entry is a mount point for an afs volume and maybe also obtain the name
>> of the volume mounted?
> 
> Assuming vanilla AFS ... the absolute easiest way to check to see if a
> directory entry is a mount point is stat() the directory.  If the inode
> number of the directory is odd, it's a "real" directory.  If the inode
> number is even, it's a mount point.
> 
> Determing the mount point NAME is more code from C; popen("fs lsm <X>")
> might be the easist.  You won't have to do it that often once you figure
> out what is and isn't a mountpoint, though.
> 
> --Ken

I'm not sure that the application will have the ability to stat the
mount point object.  The OpenAFS cache manager will always provide the
details of the target volume root directory unless the target volume
cannot be located or accessed.

Jeffrey Altman


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to