summaryrefslogtreecommitdiff
path: root/src/fuse
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-01-04 00:58:06 -0600
committerAlejandro Soto <alejandro@34project.org>2022-01-04 00:58:06 -0600
commit30a119364b8cf0bb26046232a7d8862c6afa2580 (patch)
treeeb7c86fa477f809162817250ed89fa5bd07cb5d1 /src/fuse
parent32958e3116c6afe91d4b358c310737e2619e49b1 (diff)
Remove usermount_fd
Diffstat (limited to 'src/fuse')
-rw-r--r--src/fuse/mount.rs16
-rw-r--r--src/fuse/session.rs10
2 files changed, 10 insertions, 16 deletions
diff --git a/src/fuse/mount.rs b/src/fuse/mount.rs
index 6464372..9b03961 100644
--- a/src/fuse/mount.rs
+++ b/src/fuse/mount.rs
@@ -3,7 +3,7 @@ use std::{
io,
os::unix::{
ffi::OsStrExt,
- io::{AsRawFd, IntoRawFd, RawFd},
+ io::{AsRawFd, RawFd},
net::UnixStream,
},
process::Command,
@@ -114,7 +114,12 @@ where
let mut command = Command::new("fusermount3");
if !options.0.is_empty() {
- command.args(&[OsStr::new("-o"), &options.0, mountpoint.as_ref()]);
+ command.args(&[
+ OsStr::new("-o"),
+ &options.0,
+ OsStr::new("--"),
+ mountpoint.as_ref(),
+ ]);
} else {
command.arg(mountpoint);
};
@@ -143,12 +148,7 @@ where
})();
match session_fd {
- Ok(session_fd) => {
- let fusermount_fd = DumbFd(left_side.into_raw_fd());
- let session_fd = DumbFd(session_fd);
-
- Ok(Start::new(fusermount_fd, session_fd))
- }
+ Ok(session_fd) => Ok(Start::new(DumbFd(session_fd))),
Err(error) => {
drop(left_side);
diff --git a/src/fuse/session.rs b/src/fuse/session.rs
index e3af41b..94d2fd9 100644
--- a/src/fuse/session.rs
+++ b/src/fuse/session.rs
@@ -33,12 +33,10 @@ use super::{
};
pub struct Start {
- fusermount_fd: DumbFd,
session_fd: DumbFd,
}
pub struct Session {
- _fusermount_fd: DumbFd,
session_fd: AsyncFd<RawFd>,
interrupt_tx: broadcast::Sender<u64>,
buffers: Mutex<Vec<Buffer>>,
@@ -356,7 +354,6 @@ impl Start {
.collect();
let mut session = Session {
- _fusermount_fd: self.fusermount_fd,
session_fd: AsyncFd::with_interest(session_fd, tokio::io::Interest::READABLE)?,
interrupt_tx,
buffers: Mutex::new(buffers),
@@ -378,11 +375,8 @@ impl Start {
}
}
- pub(crate) fn new(fusermount_fd: DumbFd, session_fd: DumbFd) -> Self {
- Start {
- fusermount_fd,
- session_fd,
- }
+ pub(crate) fn new(session_fd: DumbFd) -> Self {
+ Start { session_fd }
}
}