Sha256: aeb2464464efd81ca0b940e3e5e3ed1b09380f3e6ba3200972e0ba100f78badc

Contents?: true

Size: 594 Bytes

Versions: 4

Compression:

Stored size: 594 Bytes

Contents

#[cfg(feature = "fs")]
#[cfg_attr(docsrs, doc(cfg(feature = "fs")))]
use crate::{backend, io, path};

/// `pivot_root(new_root, put_old)`—Change the root mount.
///
/// # References
///  - [Linux]
///
/// [Linux]: https://man7.org/linux/man-pages/man2/pivot_root.2.html
#[cfg(feature = "fs")]
#[cfg_attr(docsrs, doc(cfg(feature = "fs")))]
#[inline]
pub fn pivot_root<P: path::Arg, Q: path::Arg>(new_root: P, put_old: Q) -> io::Result<()> {
    new_root.into_with_c_str(|new_root| {
        put_old.into_with_c_str(|put_old| backend::process::syscalls::pivot_root(new_root, put_old))
    })
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/rustix-0.38.44/src/process/pivot_root.rs
wasmtime-28.0.0 ./ext/cargo-vendor/rustix-0.38.43/src/process/pivot_root.rs
wasmtime-27.0.0 ./ext/cargo-vendor/rustix-0.38.41/src/process/pivot_root.rs
wasmtime-26.0.0 ./ext/cargo-vendor/rustix-0.38.37/src/process/pivot_root.rs