Index: head/lib/libc/gen/getvfsbyname.c =================================================================== --- head/lib/libc/gen/getvfsbyname.c +++ head/lib/libc/gen/getvfsbyname.c @@ -37,10 +37,26 @@ #include #include #include +#include #include #include /* + * fusefs(5) file systems may have a "subtype" which gets appended to + * statfs(2)'s f_fstypename field on a per-mount basis. Allow getvfsbyname to + * match either the full "fusefs.foobar" or the more general "fusefs". + */ +static bool +are_fusefs(const char *fsname, const char *vfc_name) +{ + const static char fusefs[] = "fusefs"; + const static char fusefs_dot[] = "fusefs."; + + return (strncmp(fsname, fusefs_dot, sizeof(fusefs_dot) - 1) == 0 && + strcmp(fusefs, vfc_name) == 0); +} + +/* * Given a filesystem name, determine if it is resident in the kernel, * and if it is resident, return its xvfsconf structure. */ @@ -62,7 +78,8 @@ } cnt = buflen / sizeof(struct xvfsconf); for (i = 0; i < cnt; i++) { - if (strcmp(fsname, xvfsp[i].vfc_name) == 0) { + if (strcmp(fsname, xvfsp[i].vfc_name) == 0 || + are_fusefs(fsname, xvfsp[i].vfc_name)) { memcpy(vfcp, xvfsp + i, sizeof(struct xvfsconf)); free(xvfsp); return (0);