auto unmount on exit

This commit is contained in:
OMGeeky
2024-02-18 18:36:50 +01:00
parent 267167e276
commit 2523e3b4fe

View File

@@ -17,7 +17,11 @@ async fn main() -> Result<()> {
println!("Config: {:?}", **config);
let client: GDriverServiceClient = create_client(config.ip, config.port).await?;
let fs = DriveFilesystem::new(client);
mount2(fs, Path::new("/tmp/gdriver"), &[MountOption::RW])?;
mount2(
fs,
Path::new("/tmp/gdriver"),
&[MountOption::RW, MountOption::AutoUnmount],
)?;
// service::start().await?;
Ok(())