diff options
author | Diana <5275194+DianaNites@users.noreply.github.com> | 2020-03-28 14:18:42 -0400 |
---|---|---|
committer | Diana <5275194+DianaNites@users.noreply.github.com> | 2020-03-28 15:10:08 -0400 |
commit | 9064823bc4478bc8a1e777b42339f22998dee304 (patch) | |
tree | 58e2d60fb3876da70a6c38ffb11ea5dbff298293 /src/fcntl.rs | |
parent | 5c3fbbbdf129d714c98ce45fb96f96ada1f5522a (diff) | |
download | nix-9064823bc4478bc8a1e777b42339f22998dee304.zip |
Fix fallocate return type
Untested, done on github.
Fixes #1200
Diffstat (limited to 'src/fcntl.rs')
-rw-r--r-- | src/fcntl.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs index 1d66eb75..773d7991 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -468,9 +468,9 @@ libc_bitflags!( /// Allows the caller to directly manipulate the allocated disk space for the /// file referred to by fd. #[cfg(any(target_os = "linux"))] -pub fn fallocate(fd: RawFd, mode: FallocateFlags, offset: libc::off_t, len: libc::off_t) -> Result<c_int> { +pub fn fallocate(fd: RawFd, mode: FallocateFlags, offset: libc::off_t, len: libc::off_t) -> Result<()> { let res = unsafe { libc::fallocate(fd, mode.bits(), offset, len) }; - Errno::result(res) + Errno::result(res).map(drop) } #[cfg(any(target_os = "linux", |