On Monday, 2 October 2017 23:43:53 CEST Richard W.M. Jones wrote:
It started out as "this'll be just a simple fix ..."
and turned into something a bit over-engineered in the end.
Here it is anyway.
(replying here, since my comments span both patches)
Even if we are supporting Linux only at the moment, IMHO it would be a
better idea to not expose f_type as part of the statvfs struct, since
it is not POSIX. After all, it is not yet used by callers of StatVFS.
Instead, I'd implement directly is_remote in C (directly in builder),
calling directly fstatfs, and using the various *_MAGIC defines
provided by linux/magic.h. This approach avoids duplicating in OCaml
the IDs of the various filesystems, and makes it easier to port to
other OSes.
--
Pino Toscano