Not implement os::unix::fs::chroot
for vxworks
This commit is contained in:
parent
63791233ff
commit
03e90b7f7e
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue