summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mqueue.rs12
-rw-r--r--src/pty.rs12
-rw-r--r--src/sys/ioctl/mod.rs2
-rw-r--r--src/sys/pthread.rs6
-rw-r--r--src/sys/ptrace.rs2
-rw-r--r--src/sys/signal.rs4
-rw-r--r--src/sys/socket/mod.rs4
-rw-r--r--src/sys/uio.rs10
-rw-r--r--src/unistd.rs6
9 files changed, 29 insertions, 29 deletions
diff --git a/src/mqueue.rs b/src/mqueue.rs
index 89bb2784..e578d5e7 100644
--- a/src/mqueue.rs
+++ b/src/mqueue.rs
@@ -66,7 +66,7 @@ impl MqAttr {
/// Open a message queue
///
-/// See also [mq_open(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_open.html)
+/// See also [`mq_open(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_open.html)
pub fn mq_open(name: &CString,
oflag: MQ_OFlag,
mode: Mode,
@@ -86,7 +86,7 @@ pub fn mq_open(name: &CString,
/// Remove a message queue
///
-/// See also [mq_unlink(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_unlink.html)
+/// See also [`mq_unlink(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_unlink.html)
pub fn mq_unlink(name: &CString) -> Result<()> {
let res = unsafe { libc::mq_unlink(name.as_ptr()) };
Errno::result(res).map(drop)
@@ -94,7 +94,7 @@ pub fn mq_unlink(name: &CString) -> Result<()> {
/// Close a message queue
///
-/// See also [mq_close(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_close.html)
+/// See also [`mq_close(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_close.html)
pub fn mq_close(mqdes: mqd_t) -> Result<()> {
let res = unsafe { libc::mq_close(mqdes) };
Errno::result(res).map(drop)
@@ -102,7 +102,7 @@ pub fn mq_close(mqdes: mqd_t) -> Result<()> {
/// Receive a message from a message queue
///
-/// See also [mq_receive(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_receive.html)
+/// See also [`mq_receive(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_receive.html)
pub fn mq_receive(mqdes: mqd_t, message: &mut [u8], msg_prio: &mut u32) -> Result<usize> {
let len = message.len() as size_t;
let res = unsafe {
@@ -116,7 +116,7 @@ pub fn mq_receive(mqdes: mqd_t, message: &mut [u8], msg_prio: &mut u32) -> Resul
/// Send a message to a message queue
///
-/// See also [mq_send(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_send.html)
+/// See also [`mq_send(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_send.html)
pub fn mq_send(mqdes: mqd_t, message: &[u8], msq_prio: u32) -> Result<()> {
let res = unsafe {
libc::mq_send(mqdes,
@@ -129,7 +129,7 @@ pub fn mq_send(mqdes: mqd_t, message: &[u8], msq_prio: u32) -> Result<()> {
/// Get message queue attributes
///
-/// See also [mq_getattr(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_getattr.html)
+/// See also [`mq_getattr(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_getattr.html)
pub fn mq_getattr(mqd: mqd_t) -> Result<MqAttr> {
let mut attr = unsafe { mem::uninitialized::<libc::mq_attr>() };
let res = unsafe { libc::mq_getattr(mqd, &mut attr) };
diff --git a/src/pty.rs b/src/pty.rs
index 09c30cf4..ea0e543d 100644
--- a/src/pty.rs
+++ b/src/pty.rs
@@ -62,7 +62,7 @@ impl Drop for PtyMaster {
}
/// Grant access to a slave pseudoterminal (see
-/// [grantpt(3)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/grantpt.html))
+/// [`grantpt(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/grantpt.html))
///
/// `grantpt()` changes the mode and owner of the slave pseudoterminal device corresponding to the
/// master pseudoterminal referred to by `fd`. This is a necessary step towards opening the slave.
@@ -76,7 +76,7 @@ pub fn grantpt(fd: &PtyMaster) -> Result<()> {
}
/// Open a pseudoterminal device (see
-/// [posix_openpt(3)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_openpt.html))
+/// [`posix_openpt(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_openpt.html))
///
/// `posix_openpt()` returns a file descriptor to an existing unused pseuterminal master device.
///
@@ -123,7 +123,7 @@ pub fn posix_openpt(flags: fcntl::OFlag) -> Result<PtyMaster> {
}
/// Get the name of the slave pseudoterminal (see
-/// [ptsname(3)](http://man7.org/linux/man-pages/man3/ptsname.3.html))
+/// [`ptsname(3)`](http://man7.org/linux/man-pages/man3/ptsname.3.html))
///
/// `ptsname()` returns the name of the slave pseudoterminal device corresponding to the master
/// referred to by `fd`.
@@ -150,7 +150,7 @@ pub unsafe fn ptsname(fd: &PtyMaster) -> Result<String> {
}
/// Get the name of the slave pseudoterminal (see
-/// [ptsname(3)](http://man7.org/linux/man-pages/man3/ptsname.3.html))
+/// [`ptsname(3)`](http://man7.org/linux/man-pages/man3/ptsname.3.html))
///
/// `ptsname_r()` returns the name of the slave pseudoterminal device corresponding to the master
/// referred to by `fd`. This is the threadsafe version of `ptsname()`, but it is not part of the
@@ -177,7 +177,7 @@ pub fn ptsname_r(fd: &PtyMaster) -> Result<String> {
}
/// Unlock a pseudoterminal master/slave pseudoterminal pair (see
-/// [unlockpt(3)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlockpt.html))
+/// [`unlockpt(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlockpt.html))
///
/// `unlockpt()` unlocks the slave pseudoterminal device corresponding to the master pseudoterminal
/// referred to by `fd`. This must be called before trying to open the slave side of a
@@ -194,7 +194,7 @@ pub fn unlockpt(fd: &PtyMaster) -> Result<()> {
/// Create a new pseudoterminal, returning the slave and master file descriptors
/// in `OpenptyResult`
-/// (see [openpty](http://man7.org/linux/man-pages/man3/openpty.3.html)).
+/// (see [`openpty`](http://man7.org/linux/man-pages/man3/openpty.3.html)).
///
/// If `winsize` is not `None`, the window size of the slave will be set to
/// the values in `winsize`. If `termios` is not `None`, the pseudoterminal's
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"))]
diff --git a/src/unistd.rs b/src/unistd.rs
index acabdf0c..56390d90 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -480,7 +480,7 @@ pub fn mkfifo<P: ?Sized + NixPath>(path: &P, mode: Mode) -> Result<()> {
Errno::result(res).map(drop)
}
-/// Returns the current directory as a PathBuf
+/// Returns the current directory as a `PathBuf`
///
/// Err is returned if the current user doesn't have the permission to read or search a component
/// of the current path.
@@ -729,7 +729,7 @@ pub fn sethostname<S: AsRef<OsStr>>(name: S) -> Result<()> {
}
/// Get the host name and store it in the provided buffer, returning a pointer
-/// the CStr in that buffer on success (see
+/// the `CStr` in that buffer on success (see
/// [gethostname(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html)).
///
/// This function call attempts to get the host name for the running system and
@@ -1337,7 +1337,7 @@ pub fn sleep(seconds: libc::c_uint) -> c_uint {
/// Creates a regular file which persists even after process termination
///
-/// * `template`: a path whose 6 rightmost characters must be X, e.g. /tmp/tmpfile_XXXXXX
+/// * `template`: a path whose 6 rightmost characters must be X, e.g. `/tmp/tmpfile_XXXXXX`
/// * returns: tuple of file descriptor and filename
///
/// Err is returned either if no temporary filename could be created or the template doesn't