Comment 3 for bug 1471906

Revision history for this message
Colin Ian King (colin-king) wrote : Re: camera app is polling the file system every second

I'm not sure what mechanism is being used, but it certainly does not look like it is using a more efficient mechanism such as statfs(2) or fstatfs(2) both of which return struct statfs containing f_blocks and f_bfree that allow one to determine how much of a percentage of free space is available.

These system calls interrogate the kernel's current view of file system state rather than having to poll and read /proc entries. It is more efficient and better still returns correct data.