mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-12-06 19:39:20 +01:00
Add shared_directories preset parameter (#35)
This commit is contained in:
@@ -38,6 +38,24 @@ impl<'a> MountStack<'a> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn bind_mount(
|
||||
&mut self,
|
||||
source: PathBuf,
|
||||
target: PathBuf,
|
||||
options: Option<&str>,
|
||||
) -> nix::Result<()> {
|
||||
debug!("Mounting {:?} to {:?}", source, target);
|
||||
mount::<_, _, str, _>(
|
||||
Some(&source),
|
||||
&target,
|
||||
None,
|
||||
MsFlags::MS_BIND | MsFlags::MS_NOATIME, // Read-only flag has no effect for bind mounts
|
||||
options,
|
||||
)?;
|
||||
self.targets.push(target);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn _umount(&mut self) -> Result<(), Error> {
|
||||
let mut result = Ok(());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user