From abd76aa75963904add5ac00364b887f13241cb7a Mon Sep 17 00:00:00 2001 From: rupansh-arch Date: Mon, 18 Oct 2021 03:56:26 +0530 Subject: enable process_vm_readv, process_vm_writev for android CHANGELOG: add process_vm_* entry process_vm_*: fix documentation for android expose process_vm_readv, process_vm_writev for android Signed-off-by: rupansh-arch --- src/sys/uio.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/sys/uio.rs b/src/sys/uio.rs index d9b3bb16..42298300 100644 --- a/src/sys/uio.rs +++ b/src/sys/uio.rs @@ -97,7 +97,7 @@ pub fn pread(fd: RawFd, buf: &mut [u8], offset: off_t) -> Result{ /// therefore not represented in Rust by an actual slice as `IoVec` is. It /// is used with [`process_vm_readv`](fn.process_vm_readv.html) /// and [`process_vm_writev`](fn.process_vm_writev.html). -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg_attr(docsrs, doc(cfg(all())))] #[repr(C)] #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] @@ -125,13 +125,13 @@ feature! { /// `CAP_SYS_PTRACE`), or you must be running as the same user as the /// target process and the OS must have unprivileged debugging enabled. /// -/// This function is only available on Linux. +/// This function is only available on Linux and Android(SDK23+). /// /// [`process_vm_writev`(2)]: https://man7.org/linux/man-pages/man2/process_vm_writev.2.html /// [ptrace]: ../ptrace/index.html /// [`IoVec`]: struct.IoVec.html /// [`RemoteIoVec`]: struct.RemoteIoVec.html -#[cfg(all(target_os = "linux", not(target_env = "uclibc")))] +#[cfg(all(any(target_os = "linux", target_os = "android"), not(target_env = "uclibc")))] pub fn process_vm_writev( pid: crate::unistd::Pid, local_iov: &[IoVec<&[u8]>], @@ -160,13 +160,13 @@ pub fn process_vm_writev( /// `CAP_SYS_PTRACE`), or you must be running as the same user as the /// target process and the OS must have unprivileged debugging enabled. /// -/// This function is only available on Linux. +/// This function is only available on Linux and Android(SDK23+). /// /// [`process_vm_readv`(2)]: https://man7.org/linux/man-pages/man2/process_vm_readv.2.html /// [`ptrace`]: ../ptrace/index.html /// [`IoVec`]: struct.IoVec.html /// [`RemoteIoVec`]: struct.RemoteIoVec.html -#[cfg(all(target_os = "linux", not(target_env = "uclibc")))] +#[cfg(all(any(target_os = "linux", target_os = "android"), not(target_env = "uclibc")))] pub fn process_vm_readv( pid: crate::unistd::Pid, local_iov: &[IoVec<&mut [u8]>], -- cgit v1.2.3