Hi all,
I am writing a shared library that needs to obtain the volume label of the device/drive on which the file it is working with resides. It does this by opening the raw device (/dev/disk*) and reading out the superblock structure of the mounted disk or device.
I have used statfs() to obtain the device but when I try to open it with open() is fails with EBUSY even when I specify the O_RDONLY flag. My code works perfectly under Linux.
Is there some way round this or should I be doing this another way under Mac OS/Darwin?
Regards,
Chris
I am writing a shared library that needs to obtain the volume label of the device/drive on which the file it is working with resides. It does this by opening the raw device (/dev/disk*) and reading out the superblock structure of the mounted disk or device.
I have used statfs() to obtain the device but when I try to open it with open() is fails with EBUSY even when I specify the O_RDONLY flag. My code works perfectly under Linux.
Is there some way round this or should I be doing this another way under Mac OS/Darwin?
Regards,
Chris