// Copyright 2018 The ChromiumOS Authors1// Use of this source code is governed by a BSD-style license that can be2// found in the LICENSE file.34//! This module exposes Linux's off64_t, pread*64, and pwrite*64 identifiers as the non-64 POSIX5//! versions, similar to defining _FILE_OFFSET_BITS=64 in a C program.67use std::fs::File;8use std::io::Error;9use std::io::Result;1011use super::fallocate;12use super::FallocateMode;13use crate::FileAllocate;1415impl FileAllocate for File {16fn allocate(&self, offset: u64, len: u64) -> Result<()> {17fallocate(self, FallocateMode::Allocate, offset, len)18.map_err(|e| Error::from_raw_os_error(e.errno()))19}20}2122// This module allows the macros in unix/file_traits.rsto refer to $crate::platform::X and ensures23// other crates don't need to add additional crates to their Cargo.toml.24pub mod lib {25pub use libc::off64_t as off_t;26pub use libc::pread64 as pread;27pub use libc::preadv64 as preadv;28pub use libc::pwrite64 as pwrite;29pub use libc::pwritev64 as pwritev;30}313233