Browse Source

Refactor error handling in fd_advise

pull/502/head
Marcin Mielniczuk 5 years ago
committed by Jakub Konka
parent
commit
8d7e80f440
  1. 3
      src/sys/unix/hostcalls_impl/fs.rs

3
src/sys/unix/hostcalls_impl/fs.rs

@ -63,8 +63,7 @@ pub(crate) fn fd_advise(
_ => return Err(Error::EINVAL),
};
posix_fadvise(file.as_raw_fd(), offset, len, host_advice)
.map_err(|err| errno_from_nix(err.as_errno().unwrap()))?;
posix_fadvise(file.as_raw_fd(), offset, len, host_advice)?;
}
Ok(())

Loading…
Cancel
Save