libcros 0.6.6

A Rust library that provides easy-to-use functions for interacting with a Chrome device
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[cfg(target_arch = "x86_64")]
use crate::libc::asm::x86_64::{syscall2, SYSCALL_FTRUNCATE};

#[cfg(target_arch = "aarch64")]
use crate::libc::asm::aarch64::{syscall2, SYSCALL_FTRUNCATE};

#[cfg(target_arch = "arm")]
use crate::libc::asm::armv7::{syscall2, SYSCALL_FTRUNCATE};

pub unsafe fn ftruncate(fd: i32, length: i64) -> isize {
  unsafe { syscall2(SYSCALL_FTRUNCATE, fd as usize, length as usize) }
}