Skip to content

Fix typos in documentation #1620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/poll.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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