diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-11-09 08:53:15 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-11-09 08:53:15 +0000 |
commit | e3b1c847a4237ad990cab71427927ced34b47507 (patch) | |
tree | 3ca311db88d94e89d783fa9b1a145bd8dbf164b1 /sys/fs/fuse/fuse_vfsops.c | |
parent | 8b8af16875c788e63523dc574fb2e02b8728c651 (diff) |
Make it possible to mount a fuse filesystem, such as squashfuse,
from a Linux binary. Should come handy for AppImages.
Reviewed by: asomers
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26959
Notes
Notes:
svn path=/head/; revision=367517
Diffstat (limited to 'sys/fs/fuse/fuse_vfsops.c')
-rw-r--r-- | sys/fs/fuse/fuse_vfsops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index ce7ffeda2498..6cfdb6c3d801 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -300,6 +300,7 @@ fuse_vfsop_mount(struct mount *mp) uint64_t mntopts, __mntopts; uint32_t max_read; + int linux_errnos; int daemon_timeout; int fd; @@ -312,6 +313,7 @@ fuse_vfsop_mount(struct mount *mp) subtype = NULL; max_read = ~0; + linux_errnos = 0; err = 0; mntopts = 0; __mntopts = 0; @@ -337,6 +339,7 @@ fuse_vfsop_mount(struct mount *mp) FUSE_FLAGOPT(intr, FSESS_INTR); (void)vfs_scanopt(opts, "max_read=", "%u", &max_read); + (void)vfs_scanopt(opts, "linux_errnos", "%d", &linux_errnos); if (vfs_scanopt(opts, "timeout=", "%u", &daemon_timeout) == 1) { if (daemon_timeout < FUSE_MIN_DAEMON_TIMEOUT) daemon_timeout = FUSE_MIN_DAEMON_TIMEOUT; @@ -411,6 +414,7 @@ fuse_vfsop_mount(struct mount *mp) data->dataflags |= mntopts; data->max_read = max_read; data->daemon_timeout = daemon_timeout; + data->linux_errnos = linux_errnos; data->mnt_flag = mp->mnt_flag & MNT_UPDATEMASK; FUSE_UNLOCK(); |