diff options
author | Karel Zak | 2010-01-11 15:12:02 +0100 |
---|---|---|
committer | Karel Zak | 2010-06-03 15:20:10 +0200 |
commit | 27c6d41518e139529feaac442716509bd8e31f43 (patch) | |
tree | c98738d207d7584f58b2fc993e290cc7aa42c4b4 /shlibs/mount/src/mount.h.in | |
parent | libmount: proper tests definition in Makefile.am (diff) | |
download | kernel-qcow2-util-linux-27c6d41518e139529feaac442716509bd8e31f43.tar.gz kernel-qcow2-util-linux-27c6d41518e139529feaac442716509bd8e31f43.tar.xz kernel-qcow2-util-linux-27c6d41518e139529feaac442716509bd8e31f43.zip |
libmount: add mtab locking code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/mount.h.in')
-rw-r--r-- | shlibs/mount/src/mount.h.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/shlibs/mount/src/mount.h.in b/shlibs/mount/src/mount.h.in index ab644a23e..05912e112 100644 --- a/shlibs/mount/src/mount.h.in +++ b/shlibs/mount/src/mount.h.in @@ -38,6 +38,13 @@ extern "C" { typedef struct _mnt_cache mnt_cache; /** + * mnt_lock: + * + * Stores information about locked file (e.g. /etc/mtab) + */ +typedef struct _mnt_lock mnt_lock; + +/** * mnt_iter: * * Generic iterator (stores state about lists) @@ -176,6 +183,14 @@ extern char *mnt_optls_create_mtab_optstr(mnt_optls *ls); extern char *mnt_optls_create_userspace_optstr(mnt_optls *ls); extern int mnt_optls_print_debug(mnt_optls *ls, FILE *file); +/* lock.c */ +extern mnt_lock *mnt_new_lock(const char *lockfile, pid_t id); +extern void mnt_free_lock(mnt_lock *ml); +extern const char *mnt_lock_get_lockfile(mnt_lock *ml); +extern const char *mnt_lock_get_linkfile(mnt_lock *ml); +extern void mnt_unlock_file(mnt_lock *ml); +extern int mnt_lock_file(mnt_lock *ml); + /* * mount(8) userspace options masks (MNT_MAP_USERSPACE map) |