kernel: By default, MNT_DETACH is used as the value for the mount point.
This commit is contained in:
@@ -361,7 +361,7 @@ enum Umount {
|
||||
check_mnt: bool,
|
||||
|
||||
/// Umount flags (0 or 8 for MNT_DETACH)
|
||||
#[arg(long, default_value = "0")]
|
||||
#[arg(long, default_value = "-1")]
|
||||
flags: i32,
|
||||
},
|
||||
|
||||
|
||||
@@ -87,7 +87,11 @@ impl UmountManager {
|
||||
}
|
||||
|
||||
pub fn add_entry(&mut self, path: &str, check_mnt: bool, flags: i32) -> Result<()> {
|
||||
let exists = self.defaults.iter().chain(&self.config.entries).any(|e| e.path == path);
|
||||
let exists = self
|
||||
.defaults
|
||||
.iter()
|
||||
.chain(&self.config.entries)
|
||||
.any(|e| e.path == path);
|
||||
if exists {
|
||||
return Err(anyhow!("Entry already exists: {}", path));
|
||||
}
|
||||
@@ -166,7 +170,7 @@ impl UmountManager {
|
||||
UmountEntry {
|
||||
path: "/data/adb/modules".to_string(),
|
||||
check_mnt: false,
|
||||
flags: 0x00000002, // MNT_DETACH
|
||||
flags: -1,
|
||||
is_default: true,
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user