From 2540349cced5bf2cd9f4847b0ab2a5e4a86ac7b5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 23 Dec 2010 23:15:58 +0100 Subject: [PATCH] libmount: cleanup context API Signed-off-by: Karel Zak --- shlibs/mount/src/context.c | 14 -------------- shlibs/mount/src/mount.h.in | 10 ++++++++-- shlibs/mount/src/mountP.h | 1 - 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/shlibs/mount/src/context.c b/shlibs/mount/src/context.c index 8fbad4a8..7eda42ff 100644 --- a/shlibs/mount/src/context.c +++ b/shlibs/mount/src/context.c @@ -294,20 +294,6 @@ int mnt_context_disable_mtab(mnt_context *cxt, int disable) return set_flag(cxt, MNT_FL_NOMTAB, disable); } -/** - * mnt_context_disable_lock: - * @cxt: mount context - * @disable: TRUE or FALSE - * - * Disable/enable mtab lock. - * - * Returns: 0 on success, negative number in case of error. - */ -int mnt_context_disable_lock(mnt_context *cxt, int disable) -{ - return set_flag(cxt, MNT_FL_NOLOCK, disable); -} - /** * mnt_context_enable_force: * @cxt: mount context diff --git a/shlibs/mount/src/mount.h.in b/shlibs/mount/src/mount.h.in index ee56375e..566c9cd7 100644 --- a/shlibs/mount/src/mount.h.in +++ b/shlibs/mount/src/mount.h.in @@ -331,19 +331,21 @@ extern mnt_context *mnt_new_context(void); extern void mnt_free_context(mnt_context *cxt); extern int mnt_reset_context(mnt_context *cxt); extern int mnt_context_is_restricted(mnt_context *cxt); + extern int mnt_context_set_optsmode(mnt_context *cxt, int mode); extern int mnt_context_disable_canonicalize(mnt_context *cxt, int disable); extern int mnt_context_enable_lazy(mnt_context *cxt, int enable); +extern int mnt_context_enable_rdonly_umount(mnt_context *cxt, int enable); extern int mnt_context_disable_helpers(mnt_context *cxt, int disable); extern int mnt_context_enable_sloppy(mnt_context *cxt, int enable); extern int mnt_context_enable_fake(mnt_context *cxt, int enable); extern int mnt_context_disable_mtab(mnt_context *cxt, int disable); -extern int mnt_context_disable_lock(mnt_context *cxt, int disable); extern int mnt_context_enable_force(mnt_context *cxt, int enable); extern int mnt_context_enable_verbose(mnt_context *cxt, int enable); extern int mnt_context_enable_loopdel(mnt_context *cxt, int enable); -extern int mnt_context_enable_rdonly_umount(mnt_context *cxt, int enable); + extern int mnt_context_set_fs(mnt_context *cxt, mnt_fs *fs); +extern mnt_fs *mnt_context_get_fs(mnt_context *cxt); extern int mnt_context_set_source(mnt_context *cxt, const char *source); extern int mnt_context_set_target(mnt_context *cxt, const char *target); extern int mnt_context_set_fstype(mnt_context *cxt, const char *fstype); @@ -351,19 +353,23 @@ extern int mnt_context_set_options(mnt_context *cxt, const char *optstr); extern int mnt_context_append_options(mnt_context *cxt, const char *optstr); extern int mnt_context_set_fstype_pattern(mnt_context *cxt, const char *pattern); extern int mnt_context_set_options_pattern(mnt_context *cxt, const char *pattern); + extern int mnt_context_set_fstab(mnt_context *cxt, mnt_tab *tb); extern int mnt_context_get_fstab(mnt_context *cxt, mnt_tab **tb); extern int mnt_context_get_mtab(mnt_context *cxt, mnt_tab **tb); extern int mnt_context_set_cache(mnt_context *cxt, mnt_cache *cache); extern mnt_cache *mnt_context_get_cache(mnt_context *cxt); extern mnt_lock *mnt_context_get_lock(mnt_context *cxt); + extern int mnt_context_set_mountflags(mnt_context *cxt, unsigned long flags); extern int mnt_context_get_mountflags(mnt_context *cxt, unsigned long *flags); extern int mnt_context_set_userspace_mountflags(mnt_context *cxt, unsigned long flags); extern int mnt_context_get_userspace_mountflags(mnt_context *cxt, unsigned long *flags); + extern int mnt_context_set_mountdata(mnt_context *cxt, void *data); extern int mnt_context_apply_fstab(mnt_context *cxt); extern int mnt_context_get_status(mnt_context *cxt); +extern int mnt_context_strerror(mnt_context *cxt, char *buf, size_t bufsiz); extern int mnt_context_do_mount(mnt_context *cxt); extern int mnt_context_do_umount(mnt_context *cxt); diff --git a/shlibs/mount/src/mountP.h b/shlibs/mount/src/mountP.h index fe6ea569..351bd3c5 100644 --- a/shlibs/mount/src/mountP.h +++ b/shlibs/mount/src/mountP.h @@ -274,7 +274,6 @@ struct _mnt_context #define MNT_FL_LAZY (1 << 7) #define MNT_FL_FORCE (1 << 8) #define MNT_FL_NOCANONICALIZE (1 << 9) -#define MNT_FL_NOLOCK (1 << 10) /* don't lock mtab file */ #define MNT_FL_RDONLY_UMOUNT (1 << 11) /* remount,ro after EBUSY umount(2) */ #define MNT_FL_EXTERN_FS (1 << 15) /* cxt->fs is not private */ -- 2.39.5