summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorMarcin Mielniczuk <marmistrz.dev@zoho.eu>2017-07-20 10:32:33 +0200
committerMarcin Mielniczuk <marmistrz.dev@zoho.eu>2017-07-20 10:32:33 +0200
commitb4f1749b176fa29a5523d2b3bf5665b5f46d96be (patch)
tree2d20ffe6151bcefefc5ca8f2d0d01bb1d7b415eb /src/sys
parent07e6c2f5c2d2a95fcfcd509556c4d1441a91adfb (diff)
downloadnix-b4f1749b176fa29a5523d2b3bf5665b5f46d96be.zip
Rename the public ptrace_* functions.
Unlike in C, we have namespacing in Rust. Renaming the functions allows us to avoid a `use nix::sys::ptrace::*` in favor of `use nix::sys::ptrace` and then calling, for example, `ptrace::traceme()`
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/ptrace.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sys/ptrace.rs b/src/sys/ptrace.rs
index 73ca9160..877bfcb0 100644
--- a/src/sys/ptrace.rs
+++ b/src/sys/ptrace.rs
@@ -108,7 +108,7 @@ fn ptrace_other(request: ptrace::PtraceRequest, pid: Pid, addr: *mut c_void, dat
}
/// Set options, as with `ptrace(PTRACE_SETOPTIONS,...)`.
-pub fn ptrace_setoptions(pid: Pid, options: ptrace::PtraceOptions) -> Result<()> {
+pub fn setoptions(pid: Pid, options: ptrace::PtraceOptions) -> Result<()> {
use self::ptrace::*;
use std::ptr;
@@ -117,19 +117,19 @@ pub fn ptrace_setoptions(pid: Pid, options: ptrace::PtraceOptions) -> Result<()>
}
/// Gets a ptrace event as described by `ptrace(PTRACE_GETEVENTMSG,...)`
-pub fn ptrace_getevent(pid: Pid) -> Result<c_long> {
+pub fn getevent(pid: Pid) -> Result<c_long> {
use self::ptrace::*;
ptrace_get_data::<c_long>(PTRACE_GETEVENTMSG, pid)
}
/// Get siginfo as with `ptrace(PTRACE_GETSIGINFO,...)`
-pub fn ptrace_getsiginfo(pid: Pid) -> Result<siginfo_t> {
+pub fn getsiginfo(pid: Pid) -> Result<siginfo_t> {
use self::ptrace::*;
ptrace_get_data::<siginfo_t>(PTRACE_GETSIGINFO, pid)
}
/// Set siginfo as with `ptrace(PTRACE_SETSIGINFO,...)`
-pub fn ptrace_setsiginfo(pid: Pid, sig: &siginfo_t) -> Result<()> {
+pub fn setsiginfo(pid: Pid, sig: &siginfo_t) -> Result<()> {
use self::ptrace::*;
let ret = unsafe{
Errno::clear();