Skip to content

Commit

Permalink
Not implement os::unix::fs::chroot for vxworks
Browse files Browse the repository at this point in the history
  • Loading branch information
CDirkx committed May 19, 2021
1 parent 6379123 commit 03e90b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/std/src/os/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ impl DirBuilderExt for fs::DirBuilder {
/// }
/// ```
#[unstable(feature = "unix_chroot", issue = "84715")]
#[cfg(not(target_os = "fuchsia"))]
#[cfg(not(any(target_os = "fuchsia", target_os = "vxworks")))]
pub fn chroot<P: AsRef<Path>>(dir: P) -> io::Result<()> {
sys::fs::chroot(dir.as_ref())
}
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
Ok(bytes_copied as u64)
}

#[cfg(not(target_os = "fuchsia"))]
#[cfg(not(any(target_os = "fuchsia", target_os = "vxworks")))]
pub fn chroot(dir: &Path) -> io::Result<()> {
let dir = cstr(dir)?;
cvt(unsafe { libc::chroot(dir.as_ptr()) })?;
Expand Down

0 comments on commit 03e90b7

Please sign in to comment.