@@ -1,5 +1,4 @@
|
||||
use anyhow::{anyhow, bail, Ok, Result};
|
||||
use std::fs::create_dir;
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
use anyhow::Context;
|
||||
@@ -182,19 +181,6 @@ pub fn mount_tmpfs(dest: impl AsRef<Path>) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
pub fn mount_devpts(dest: impl AsRef<Path>) -> Result<()> {
|
||||
create_dir(dest.as_ref())?;
|
||||
mount(
|
||||
KSU_OVERLAY_SOURCE,
|
||||
dest.as_ref(),
|
||||
"devpts",
|
||||
MountFlags::empty(),
|
||||
"newinstance",
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
pub fn bind_mount(from: impl AsRef<Path>, to: impl AsRef<Path>) -> Result<()> {
|
||||
info!(
|
||||
@@ -339,8 +325,3 @@ pub fn mount_overlay(
|
||||
pub fn mount_tmpfs(_dest: impl AsRef<Path>) -> Result<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "linux", target_os = "android")))]
|
||||
pub fn mount_devpts(_dest: impl AsRef<Path>) -> Result<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user