mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
For the statfs buffer used by detectAllDrives(), only allocate what is needed, instead of an arbitrary value. Calling getfsstat() a first time with a NULL pointer will return the number of mounted file systems. We can then use that a allocate a buffer at the right size for the next getfsstat() call. It looks like we can then reasonably expect MNT_NOWAIT to be enough for the second call that immediately follows... Idea from criezy.