summaryrefslogtreecommitdiff
path: root/src/fuse/session.rs
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2021-12-24 04:28:30 -0600
committerAlejandro Soto <alejandro@34project.org>2021-12-24 04:34:19 -0600
commit7f3c0f5b69e76de03417c84d3d217c0bf866e5ec (patch)
tree8b11657b42384c97966ffe607c79a5903235fd7f /src/fuse/session.rs
parentfc6f4052648a77a66f6bd50ffd1647992cb68b10 (diff)
Update dependencies
Diffstat (limited to '')
-rw-r--r--src/fuse/session.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fuse/session.rs b/src/fuse/session.rs
index 35ebb69..4a34aae 100644
--- a/src/fuse/session.rs
+++ b/src/fuse/session.rs
@@ -1,7 +1,8 @@
use std::{
collections::{hash_map, HashMap},
convert::TryInto,
- os::unix::io::IntoRawFd,
+ io,
+ os::unix::io::{IntoRawFd, RawFd},
sync::{Arc, Mutex},
};
@@ -21,7 +22,7 @@ use smallvec::SmallVec;
use crate::{
proto::{self, InHeader},
- util::{display_or, from_nix_error, OutputChain},
+ util::{display_or, OutputChain},
Errno, FuseError, FuseResult, Ino,
};
@@ -140,7 +141,7 @@ impl<Fs: Fuse> Session<Fs> {
IoVec::from_mut_slice(large_buffer),
];
- let bytes = readv(*self.session_fd.get_ref(), &mut io_vecs).map_err(from_nix_error)?;
+ let bytes = readv(*self.session_fd.get_ref(), &mut io_vecs).map_err(io::Error::from)?;
InputBuffer { bytes, data }
};
@@ -429,7 +430,8 @@ impl<Fs: Fuse> Session<Fs> {
IoVec::from_mut_slice(&mut large_buffer[SBO_SIZE..]),
];
- match readable.try_io(|fd| readv(*fd.get_ref(), &mut io_vecs).map_err(from_nix_error)) {
+ let mut read = |fd: &AsyncFd<RawFd>| readv(*fd.get_ref(), &mut io_vecs);
+ match readable.try_io(|fd| read(fd).map_err(io::Error::from)) {
Ok(Ok(bytes)) => {
if bytes > SBO_SIZE {
(&mut large_buffer[..SBO_SIZE]).copy_from_slice(sbo);
@@ -479,7 +481,7 @@ impl<Fs: Fuse> Session<Fs> {
.map(IoVec::from_slice)
.collect();
- let written = writev(*self.session_fd.get_ref(), &buffers).map_err(from_nix_error)?;
+ let written = writev(*self.session_fd.get_ref(), &buffers).map_err(io::Error::from)?;
if written == length as usize {
Ok(())
} else {