Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148308673
D35088.id105491.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35088.id105491.diff
View Options
diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c
--- a/sys/fs/fuse/fuse_vfsops.c
+++ b/sys/fs/fuse/fuse_vfsops.c
@@ -303,12 +303,14 @@
int linux_errnos;
int daemon_timeout;
int fd;
+ int cc;
+ int fspeclen;
struct cdev *fdev;
struct fuse_data *data = NULL;
struct thread *td;
struct file *fp, *fptmp;
- char *fspec, *subtype;
+ char *fspec, *subtype, *fuse_spec;
struct vfsoptlist *opts;
subtype = NULL;
@@ -357,8 +359,9 @@
daemon_timeout);
}
- /* `from' contains the device name (eg. /dev/fuse0); REQUIRED */
- fspec = vfs_getopts(opts, "from", &err);
+ /* `from' contains the device name (eg. /dev/fuse0); REQUIRED
+ * /dev/fuse0:fuse_specific_mount_path is also accepted */
+ err = vfs_getopt(opts, "from", (void **)&fspec, &fspeclen);
if (!fspec)
return err;
@@ -366,7 +369,14 @@
if (vfs_scanopt(opts, "fd", "%d", &fd) != 1)
return EINVAL;
- err = fuse_getdevice(fspec, td, &fdev);
+ fuse_spec = malloc(fspeclen + 1, M_FUSEVFS, M_WAITOK);
+ for (cc = 0; cc < fspeclen && fspec[cc] != ':'; cc++) {
+ fuse_spec[cc] = fspec[cc];
+ }
+ fuse_spec[cc] = '\0';
+
+ err = fuse_getdevice(fuse_spec, td, &fdev);
+ free(fuse_spec, M_FUSEVFS);
if (err != 0)
return err;
@@ -440,7 +450,10 @@
strlcat(mp->mnt_stat.f_fstypename, subtype, MFSNAMELEN);
}
memset(mp->mnt_stat.f_mntfromname, 0, MNAMELEN);
- strlcpy(mp->mnt_stat.f_mntfromname, fspec, MNAMELEN);
+ if ((fuse_spec = strchr(fspec, ':')) != NULL)
+ strlcpy(mp->mnt_stat.f_mntfromname, fuse_spec + 1, MNAMELEN);
+ else
+ strlcpy(mp->mnt_stat.f_mntfromname, fspec, MNAMELEN);
mp->mnt_iosize_max = maxphys;
/* Now handshaking with daemon */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 18, 2:36 AM (9 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29871147
Default Alt Text
D35088.id105491.diff (1 KB)
Attached To
Mode
D35088: Add fuse mount information to 'from'
Attached
Detach File
Event Timeline
Log In to Comment