osutil: detect fuse on Linux

Summary:
The constant is not exposed in linux/magic.h, perhaps because fuse is an
optional feature. It's unlikely to be changed. Define it so fuse fstype
can be detected.

Reviewed By: DurhamG

Differential Revision: D13969640

fbshipit-source-id: 5084bdacf193261a187a74546a82995f2dd2d7c6
This commit is contained in:
Jun Wu 2019-02-06 18:18:44 -08:00 committed by Facebook Github Bot
parent 162f93f205
commit efba35645a

View File

@ -832,6 +832,11 @@ static const char* describefstype(const struct statfs* pbuf) {
return pbuf->f_fstypename;
}
#elif defined(HAVE_LINUX_STATFS)
/* FUSE_SUPER_MAGIC is mentioned in statfs linux-manpages, but not
* linux/magic.h. Define it. */
#ifndef FUSE_SUPER_MAGIC
#define FUSE_SUPER_MAGIC 0x65735546
#endif
static const char* describefstype(const struct statfs* pbuf) {
/* Begin of Linux filesystems */
#ifdef ADFS_SUPER_MAGIC