mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
Not implement os::unix::fs::chroot
for vxworks
This commit is contained in:
parent
63791233ff
commit
03e90b7f7e
@ -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())
|
||||
}
|
||||
|
@ -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()) })?;
|
||||
|
Loading…
Reference in New Issue
Block a user