Skip to content

Commit

Permalink
Merge #1620
Browse files Browse the repository at this point in the history
1620: Fix typos in documentation r=asomers a=rtzoeller



Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
  • Loading branch information
bors[bot] and rtzoeller committed Dec 27, 2021
2 parents a392647 + 57f41a8 commit 83cd1da
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/poll.rs
Expand Up @@ -10,7 +10,7 @@ use crate::errno::Errno;
/// [`ppoll`](fn.ppoll.html) functions to specify the events of interest
/// for a specific file descriptor.
///
/// After a call to `poll` or `ppoll`, the events that occured can be
/// After a call to `poll` or `ppoll`, the events that occurred can be
/// retrieved by calling [`revents()`](#method.revents) on the `PollFd`.
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
Expand All @@ -31,7 +31,7 @@ impl PollFd {
}
}

/// Returns the events that occured in the last call to `poll` or `ppoll`. Will only return
/// Returns the events that occurred in the last call to `poll` or `ppoll`. Will only return
/// `None` if the kernel provides status flags that Nix does not know about.
pub fn revents(self) -> Option<PollFlags> {
PollFlags::from_bits(self.pollfd.revents)
Expand Down
4 changes: 2 additions & 2 deletions src/pty.rs
Expand Up @@ -112,7 +112,7 @@ pub fn grantpt(fd: &PtyMaster) -> Result<()> {
/// Open a pseudoterminal device (see
/// [`posix_openpt(3)`](https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_openpt.html))
///
/// `posix_openpt()` returns a file descriptor to an existing unused pseuterminal master device.
/// `posix_openpt()` returns a file descriptor to an existing unused pseudoterminal master device.
///
/// # Examples
///
Expand Down Expand Up @@ -214,7 +214,7 @@ pub fn ptsname_r(fd: &PtyMaster) -> Result<String> {
///
/// `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
/// pseuoterminal.
/// pseudoterminal.
#[inline]
pub fn unlockpt(fd: &PtyMaster) -> Result<()> {
if unsafe { libc::unlockpt(fd.as_raw_fd()) } < 0 {
Expand Down
2 changes: 1 addition & 1 deletion src/sys/signal.rs
Expand Up @@ -866,7 +866,7 @@ pub fn pthread_sigmask(how: SigmaskHow,

/// Examine and change blocked signals.
///
/// For more informations see the [`sigprocmask` man
/// For more information see the [`sigprocmask` man
/// pages](https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigprocmask.html).
pub fn sigprocmask(how: SigmaskHow, set: Option<&SigSet>, oldset: Option<&mut SigSet>) -> Result<()> {
if set.is_none() && oldset.is_none() {
Expand Down
4 changes: 2 additions & 2 deletions src/sys/statfs.rs
Expand Up @@ -536,7 +536,7 @@ impl Debug for Statfs {

/// Describes a mounted file system.
///
/// The result is OS-dependent. For a portabable alternative, see
/// The result is OS-dependent. For a portable alternative, see
/// [`statvfs`](crate::sys::statvfs::statvfs).
///
/// # Arguments
Expand All @@ -552,7 +552,7 @@ pub fn statfs<P: ?Sized + NixPath>(path: &P) -> Result<Statfs> {

/// Describes a mounted file system.
///
/// The result is OS-dependent. For a portabable alternative, see
/// The result is OS-dependent. For a portable alternative, see
/// [`fstatvfs`](crate::sys::statvfs::fstatvfs).
///
/// # Arguments
Expand Down
2 changes: 1 addition & 1 deletion src/time.rs
Expand Up @@ -14,7 +14,7 @@ use std::mem::MaybeUninit;

/// Clock identifier
///
/// Newtype pattern around `clockid_t` (which is just alias). It pervents bugs caused by
/// Newtype pattern around `clockid_t` (which is just alias). It prevents bugs caused by
/// accidentally passing wrong value.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ClockId(clockid_t);
Expand Down
6 changes: 3 additions & 3 deletions src/unistd.rs
Expand Up @@ -204,8 +204,8 @@ impl ForkResult {
/// Create a new child process duplicating the parent process ([see
/// fork(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html)).
///
/// After calling the fork system call (successfully) two processes will
/// be created that are identical with the exception of their pid and the
/// After successfully calling the fork system call, a second process will
/// be created which is identical to the original except for the pid and the
/// return value of this function. As an example:
///
/// ```
Expand All @@ -225,7 +225,7 @@ impl ForkResult {
/// }
/// ```
///
/// This will print something like the following (order indeterministic). The
/// This will print something like the following (order nondeterministic). The
/// thing to note is that you end up with two processes continuing execution
/// immediately after the fork call but with different match arms.
///
Expand Down
2 changes: 1 addition & 1 deletion test/sys/test_ptrace.rs
Expand Up @@ -72,7 +72,7 @@ fn test_ptrace_cont() {
let _m = crate::FORK_MTX.lock();

// FIXME: qemu-user doesn't implement ptrace on all architectures
// and retunrs ENOSYS in this case.
// and returns ENOSYS in this case.
// We (ab)use this behavior to detect the affected platforms
// and skip the test then.
// On valid platforms the ptrace call should return Errno::EPERM, this
Expand Down
2 changes: 1 addition & 1 deletion test/sys/test_sockopt.rs
Expand Up @@ -122,7 +122,7 @@ fn test_so_tcp_maxseg() {
}

// The CI doesn't supported getsockopt and setsockopt on emulated processors.
// It's beleived that a QEMU issue, the tests run ok on a fully emulated system.
// It's believed that a QEMU issue, the tests run ok on a fully emulated system.
// Current CI just run the binary with QEMU but the Kernel remains the same as the host.
// So the syscall doesn't work properly unless the kernel is also emulated.
#[test]
Expand Down
2 changes: 1 addition & 1 deletion test/test_mount.rs
@@ -1,6 +1,6 @@
mod common;

// Impelmentation note: to allow unprivileged users to run it, this test makes
// Implementation note: to allow unprivileged users to run it, this test makes
// use of user and mount namespaces. On systems that allow unprivileged user
// namespaces (Linux >= 3.8 compiled with CONFIG_USER_NS), the test should run
// without root.
Expand Down

0 comments on commit 83cd1da

Please sign in to comment.