Merge branch 'getens' into 'master'
Add getens. See merge request redox-os/libredox!15
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libredox"
|
||||
authors = ["4lDO2 <4lDO2@protonmail.com>"]
|
||||
version = "0.1.9"
|
||||
version = "0.1.10"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "Redox stable ABI"
|
||||
|
||||
@@ -258,6 +258,8 @@ extern "C" {
|
||||
fn redox_get_egid_v1() -> RawResult;
|
||||
fn redox_get_rgid_v1() -> RawResult;
|
||||
|
||||
fn redox_get_ens_v0() -> RawResult;
|
||||
|
||||
// This function is used to get the credentials, pid, euid, egid etc. of the process with the target pid.
|
||||
fn redox_get_proc_credentials_v1(cap_fd: usize, target_pid: usize, buf: &mut [u8])
|
||||
-> RawResult;
|
||||
@@ -591,6 +593,10 @@ pub mod call {
|
||||
pub fn getpid() -> Result<usize> {
|
||||
Error::demux(unsafe { redox_get_pid_v1() })
|
||||
}
|
||||
#[inline]
|
||||
pub fn getens() -> Result<usize> {
|
||||
Error::demux(unsafe { redox_get_ens_v0() })
|
||||
}
|
||||
|
||||
#[inline]
|
||||
// [u8; size_of::<crate::protocol::ProcMeta>()]
|
||||
|
||||
Reference in New Issue
Block a user