diff options
author | Bryant Mairs <bryantmairs@google.com> | 2017-12-16 10:24:47 -0800 |
---|---|---|
committer | Bryant Mairs <bryantmairs@google.com> | 2017-12-20 07:05:04 -0800 |
commit | 7c1fe907ccd97d84e55912e85fd0fcf88760864c (patch) | |
tree | 07766eb0299dd9bec30774f0ca11cc711b38c84e /src/sys | |
parent | 7e7a9ed321c7a173cacaac7647e21dbe119a6eb7 (diff) | |
download | nix-7c1fe907ccd97d84e55912e85fd0fcf88760864c.zip |
Use backticks around types/functions in docs
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/ioctl/mod.rs | 2 | ||||
-rw-r--r-- | src/sys/pthread.rs | 6 | ||||
-rw-r--r-- | src/sys/ptrace.rs | 2 | ||||
-rw-r--r-- | src/sys/signal.rs | 4 | ||||
-rw-r--r-- | src/sys/socket/mod.rs | 4 | ||||
-rw-r--r-- | src/sys/uio.rs | 10 |
6 files changed, 14 insertions, 14 deletions
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs index 4169920b..44822e4f 100644 --- a/src/sys/ioctl/mod.rs +++ b/src/sys/ioctl/mod.rs @@ -255,7 +255,7 @@ macro_rules! convert_ioctl_res { ); } -/// Generates ioctl functions. See [::sys::ioctl](sys/ioctl/index.html). +/// Generates ioctl functions. See [`::sys::ioctl`](sys/ioctl/index.html). #[macro_export] macro_rules! ioctl { ($(#[$attr:meta])* bad none $name:ident with $nr:expr) => ( diff --git a/src/sys/pthread.rs b/src/sys/pthread.rs index d533946b..a4d98250 100644 --- a/src/sys/pthread.rs +++ b/src/sys/pthread.rs @@ -3,10 +3,10 @@ use libc::{self, pthread_t}; pub type Pthread = pthread_t; /// Obtain ID of the calling thread (see -/// [pthread_self(3)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_self.html) +/// [`pthread_self(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_self.html) /// -/// The thread ID returned by pthread_self() is not the same thing as -/// the kernel thread ID returned by a call to gettid(2). +/// The thread ID returned by `pthread_self()` is not the same thing as +/// the kernel thread ID returned by a call to `gettid(2)`. #[inline] pub fn pthread_self() -> Pthread { unsafe { libc::pthread_self() } diff --git a/src/sys/ptrace.rs b/src/sys/ptrace.rs index e2b153d8..8fb8f823 100644 --- a/src/sys/ptrace.rs +++ b/src/sys/ptrace.rs @@ -151,7 +151,7 @@ fn ptrace_peek(request: Request, pid: Pid, addr: *mut c_void, data: *mut c_void) } /// Function for ptrace requests that return values from the data field. -/// Some ptrace get requests populate structs or larger elements than c_long +/// Some ptrace get requests populate structs or larger elements than `c_long` /// and therefore use the data field to return values. This function handles these /// requests. fn ptrace_get_data<T>(request: Request, pid: Pid) -> Result<T> { diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 0642a691..b6a8f2f8 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -423,8 +423,8 @@ pub unsafe fn sigaction(signal: Signal, sigaction: &SigAction) -> Result<SigActi /// /// If both `set` and `oldset` is None, this function is a no-op. /// -/// For more information, visit the [pthread_sigmask](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html), -/// or [sigprocmask](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigprocmask.html) man pages. +/// For more information, visit the [`pthread_sigmask`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html), +/// or [`sigprocmask`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigprocmask.html) man pages. pub fn pthread_sigmask(how: SigmaskHow, set: Option<&SigSet>, oldset: Option<&mut SigSet>) -> Result<()> { diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 1e84854f..11e7a1af 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -1015,9 +1015,9 @@ pub fn getsockname(fd: RawFd) -> Result<SockAddr> { } } -/// Return the appropriate SockAddr type from a `sockaddr_storage` of a certain +/// Return the appropriate `SockAddr` type from a `sockaddr_storage` of a certain /// size. In C this would usually be done by casting. The `len` argument -/// should be the number of bytes in the sockaddr_storage that are actually +/// should be the number of bytes in the `sockaddr_storage` that are actually /// allocated and valid. It must be at least as large as all the useful parts /// of the structure. Note that in the case of a `sockaddr_un`, `len` need not /// include the terminating null. diff --git a/src/sys/uio.rs b/src/sys/uio.rs index 391fb25e..7447f3ff 100644 --- a/src/sys/uio.rs +++ b/src/sys/uio.rs @@ -62,7 +62,7 @@ pub fn pread(fd: RawFd, buf: &mut [u8], offset: off_t) -> Result<usize>{ /// /// This is the same underlying C structure as [`IoVec`](struct.IoVec.html), /// except that it refers to memory in some other process, and is -/// therefore not represented in Rust by an actual slice as IoVec is. It +/// 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")] @@ -81,7 +81,7 @@ pub struct RemoteIoVec { /// and `remote_iov` is a list of [`RemoteIoVec`]s identifying where the /// data should be written in the target process. On success, returns the /// number of bytes written, which will always be a whole -/// number of remote_iov chunks. +/// number of `remote_iov` chunks. /// /// This requires the same permissions as debugging the process using /// [ptrace]: you must either be a privileged process (with @@ -112,17 +112,17 @@ pub fn process_vm_writev(pid: ::unistd::Pid, local_iov: &[IoVec<&[u8]>], remote_ /// data into, and `remote_iov` is a list of [`RemoteIoVec`]s identifying /// where the source data is in the target process. On success, /// returns the number of bytes written, which will always be a whole -/// number of remote_iov chunks. +/// number of `remote_iov` chunks. /// /// This requires the same permissions as debugging the process using -/// [ptrace]: you must either be a privileged process (with +/// [`ptrace`]: you must either be a privileged process (with /// `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. /// /// [`process_vm_readv`(2)]: http://man7.org/linux/man-pages/man2/process_vm_readv.2.html -/// [ptrace]: ../ptrace/index.html +/// [`ptrace`]: ../ptrace/index.html /// [`IoVec`]: struct.IoVec.html /// [`RemoteIoVec`]: struct.RemoteIoVec.html #[cfg(any(target_os = "linux"))] |