I am trying to get the free space on the / folder using statvfs call from java,
I have check the size of statvfs struct from c it shows 44 bytes, I have allocated a byte buffer using java.nio.ByteBuffer.allocateDirect 44 bytes, and it's order is set to 44 bytes. when i call statvfs i get a return value of 0, so i am assuming call is successful, but i can't seem to get information out of ByteBuffer using buffer.getInt returns 512 f_bsize which is correct but after that i can't read.
buffer.getInt(12) should give me f_blocks but i get 0.
unsigned long f_bsize; /* File system block size */
unsigned long f_frsize; /* Fundamental file system block size */
fsblkcnt_t f_blocks; /* Blocks on FS in units of f_frsize */
or do i have a fault in my logic?