Index: sbin/mount_fusefs/mount_fusefs.c =================================================================== --- sbin/mount_fusefs/mount_fusefs.c +++ sbin/mount_fusefs/mount_fusefs.c @@ -77,6 +77,8 @@ { "max_read=", 0, ALTF_MAXREAD, 1 }, #define ALTF_SUBTYPE 0x40 { "subtype=", 0, ALTF_SUBTYPE, 1 }, + #define ALTF_FSNAME 0x80 + { "fsname=", 0, ALTF_FSNAME, 1 }, /* * MOPT_AUTOMOUNTED, included by MOPT_STDOPTS, does not fit into * the 'flags' argument to nmount(2). We have to abuse altflags @@ -87,7 +89,6 @@ #define ALTF_INTR 0x200 { "intr", 0, ALTF_INTR, 1 }, /* Linux specific options, we silently ignore them */ - { "fsname=", 0, 0x00, 1 }, { "fd=", 0, 0x00, 1 }, { "rootmode=", 0, 0x00, 1 }, { "user_id=", 0, 0x00, 1 }, @@ -110,6 +111,7 @@ static struct mntval mvals[] = { { ALTF_MAXREAD, NULL, 0 }, { ALTF_SUBTYPE, NULL, 0 }, + { ALTF_FSNAME, NULL, 0 }, { 0, NULL, 0 } }; @@ -474,8 +476,8 @@ /* " -o nonempty allow mounts over non-empty file/dir\n" */ " -o default_permissions enable permission checking by kernel\n" " -o intr interruptible mount\n" - /* " -o fsname=NAME set filesystem name\n" + /* " -o large_read issue large read requests (2.4 only)\n" */ " -o subtype=NAME set filesystem type\n" Index: sys/fs/fuse/fuse_vfsops.c =================================================================== --- sys/fs/fuse/fuse_vfsops.c +++ sys/fs/fuse/fuse_vfsops.c @@ -308,7 +308,8 @@ struct fuse_data *data = NULL; struct thread *td; struct file *fp, *fptmp; - char *fspec, *subtype; + char *fspec, *subtype, *fsname = NULL; + int fsnamelen; struct vfsoptlist *opts; subtype = NULL; @@ -440,7 +441,8 @@ strlcat(mp->mnt_stat.f_fstypename, subtype, MFSNAMELEN); } memset(mp->mnt_stat.f_mntfromname, 0, MNAMELEN); - strlcpy(mp->mnt_stat.f_mntfromname, fspec, MNAMELEN); + vfs_getopt(opts, "fsname=", (void**)&fsname, &fsnamelen); + strlcpy(mp->mnt_stat.f_mntfromname, fsname == NULL ? fspec : fsname, MNAMELEN); mp->mnt_iosize_max = maxphys; /* Now handshaking with daemon */