Top |
void | mnt_free_lock () |
int | mnt_lock_file () |
struct libmnt_lock * | mnt_new_lock () |
void | mnt_ref_lock () |
void | mnt_unref_lock () |
void | mnt_unlock_file () |
int | mnt_lock_block_signals () |
Since v2.39 libmount does nto support classic mtab locking. Now all is based on flock only.
void
mnt_free_lock (struct libmnt_lock *ml
);
Deallocates libmnt_lock. This function does not care about reference count. Don't
use this function directly -- it's better to use mnt_unref_lock()
.
The reference counting is supported since util-linux v2.40.
int
mnt_lock_file (struct libmnt_lock *ml
);
Creates a lock file.
Note that when the lock is used by mnt_update_table()
interface then libmount
uses flock()
for private library file /run/mount/utab.
void
mnt_ref_lock (struct libmnt_lock *ml
);
Increments reference counter.
Since: 2.40
void
mnt_unref_lock (struct libmnt_lock *ml
);
De-increments reference counter, on zero the ml
is automatically
deallocated by mnt_free_lock).
void
mnt_unlock_file (struct libmnt_lock *ml
);
Unlocks the file. The function could be called independently of the lock status (for example from exit(3)).