diff --git a/proxmox/src/tools/fs.rs b/proxmox/src/tools/fs.rs index 3f96d9ed..5c599106 100644 --- a/proxmox/src/tools/fs.rs +++ b/proxmox/src/tools/fs.rs @@ -514,19 +514,9 @@ pub fn lock_file( Ok(()) } -/// Open or create a lock file (append mode). Then try to -/// acquire a shared lock using `lock_file()`. -pub fn open_file_locked_shared>(path: P, timeout: Duration) -> Result { - open_file_locked_impl(path, timeout, false) -} - /// Open or create a lock file (append mode). Then try to /// acquire a lock using `lock_file()`. -pub fn open_file_locked>(path: P, timeout: Duration) -> Result { - open_file_locked_impl(path, timeout, true) -} - -fn open_file_locked_impl>(path: P, timeout: Duration, exclusive: bool) -> Result { +pub fn open_file_locked>(path: P, timeout: Duration, exclusive: bool) -> Result { let path = path.as_ref(); let mut file = match OpenOptions::new().create(true).append(true).open(path) {