Skip to content

Commit 32b125f

Browse files
committed
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 <[email protected]>
1 parent da49e4f commit 32b125f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
55

6+
## [Unreleased] - ReleaseDate
7+
### Added
8+
- Enabled `process_vm_readv` and `process_vm_writev` for Android
9+
(#[1557](https://github.com/nix-rust/nix/pull/1557))
10+
### Changed
11+
### Fixed
12+
### Removed
13+
614
## [0.23.0] - 2021-09-28
715
### Added
816

src/sys/uio.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub fn pread(fd: RawFd, buf: &mut [u8], offset: off_t) -> Result<usize>{
9191
/// therefore not represented in Rust by an actual slice as `IoVec` is. It
9292
/// is used with [`process_vm_readv`](fn.process_vm_readv.html)
9393
/// and [`process_vm_writev`](fn.process_vm_writev.html).
94-
#[cfg(target_os = "linux")]
94+
#[cfg(any(target_os = "linux", target_os = "android"))]
9595
#[repr(C)]
9696
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
9797
pub struct RemoteIoVec {
@@ -115,13 +115,13 @@ pub struct RemoteIoVec {
115115
/// `CAP_SYS_PTRACE`), or you must be running as the same user as the
116116
/// target process and the OS must have unprivileged debugging enabled.
117117
///
118-
/// This function is only available on Linux.
118+
/// This function is only available on Linux and Android(SDK23+).
119119
///
120120
/// [`process_vm_writev`(2)]: https://man7.org/linux/man-pages/man2/process_vm_writev.2.html
121121
/// [ptrace]: ../ptrace/index.html
122122
/// [`IoVec`]: struct.IoVec.html
123123
/// [`RemoteIoVec`]: struct.RemoteIoVec.html
124-
#[cfg(target_os = "linux")]
124+
#[cfg(any(target_os = "linux", target_os = "android"))]
125125
pub fn process_vm_writev(
126126
pid: crate::unistd::Pid,
127127
local_iov: &[IoVec<&[u8]>],
@@ -150,13 +150,13 @@ pub fn process_vm_writev(
150150
/// `CAP_SYS_PTRACE`), or you must be running as the same user as the
151151
/// target process and the OS must have unprivileged debugging enabled.
152152
///
153-
/// This function is only available on Linux.
153+
/// This function is only available on Linux and Android(SDK23+).
154154
///
155155
/// [`process_vm_readv`(2)]: https://man7.org/linux/man-pages/man2/process_vm_readv.2.html
156156
/// [`ptrace`]: ../ptrace/index.html
157157
/// [`IoVec`]: struct.IoVec.html
158158
/// [`RemoteIoVec`]: struct.RemoteIoVec.html
159-
#[cfg(any(target_os = "linux"))]
159+
#[cfg(any(target_os = "linux", target_os = "android"))]
160160
pub fn process_vm_readv(
161161
pid: crate::unistd::Pid,
162162
local_iov: &[IoVec<&mut [u8]>],

0 commit comments

Comments
 (0)