I'm writing a fuse file system, and using the volname
mount option supported by osxfuse to set the volume name. This works—I can see the correct name in the Finder when I view the folder containing the mount point.
However, I would like to write a test for the functionality to make sure I don't screw it up at some point in the future. How can I get the volume name for the mount programmatically in my test? I tried statfs(2)
, but statfs::f_mntfromname
contains the distinct "file system name", as displayed in the output of mount
.
I'm writing this in Go, so am looking for a specific syscall that I can call, not e.g. a Cocoa library function. But if you know how to do it in Cocoa that would still be a useful lead.