git: 6bddc3116668 - stable/13 - linux: improve FUSE support

From: Edward Tomasz Napierala <trasz_at_FreeBSD.org>
Date: Thu, 17 Feb 2022 12:54:30 UTC
The branch stable/13 has been updated by trasz:

URL: https://cgit.FreeBSD.org/src/commit/?id=6bddc3116668b0856407fc99e4452753863e9062

commit 6bddc3116668b0856407fc99e4452753863e9062
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-06-07 09:43:23 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2022-02-13 22:23:41 +0000

    linux: improve FUSE support
    
    This fixes a number of AppImages; tested with
    scribus-1.5.6.1-linux-x86_64.AppImage.
    
    Reported By:    @probonopd
    Reviewed By:    asomers, emaste
    Sponsored By:   EPSRC
    Differential Revision:  https://reviews.freebsd.org/D30606
    
    (cherry picked from commit 128a1db806daac088a79314cee060b8a204e8481)
---
 sys/compat/linux/linux_file.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 6b02c2efb88e..e6b142b179f6 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -1316,12 +1316,11 @@ linux_mount(struct thread *td, struct linux_mount_args *args)
 		strcpy(fstypename, "linprocfs");
 	} else if (strcmp(fstypename, "vfat") == 0) {
 		strcpy(fstypename, "msdosfs");
-	} else if (strcmp(fstypename, "fuse") == 0) {
+	} else if (strcmp(fstypename, "fuse") == 0 ||
+	    strncmp(fstypename, "fuse.", 5) == 0) {
 		char *fuse_options, *fuse_option, *fuse_name;
 
-		if (strcmp(mntfromname, "fuse") == 0)
-			strcpy(mntfromname, "/dev/fuse");
-
+		strcpy(mntfromname, "/dev/fuse");
 		strcpy(fstypename, "fusefs");
 		data = malloc(MNAMELEN, M_TEMP, M_WAITOK);
 		error = copyinstr(args->data, data, MNAMELEN - 1, NULL);