I would like to know any api or method to check the status of a file system whether it is readonly protected or not.
On my x86 qnx6.3 PC, I inserted a usb which has been readonly-protected.
Then mounted it on /fs/usb/.
If I try to copy or create any file on the file system(/fs/usb), I only get error message saying “Read-only file system”.
It’s ok. Now I need to be able to check whether the file system is read-only file system or not in my program.
I thought statvfs could work. But it doesn’t!!!
The flag, ‘struct statvfs::f_flag’ retireved by statvfs is only 0x100.
0x100 is not the read-only because other file system like ‘/’ retrieves same value 0x100 and I can copy files on ‘/’.
Now I found statvfs doesn’t work for my case.
Can anyone help me?