diff options
author | Karel Zak | 2010-12-03 21:13:52 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-03 12:28:47 +0100 |
commit | 77417bc00d76086d3cb5876f6fd52d5369c918a4 (patch) | |
tree | c71c225182ee80b5df388ab8a01c65500a8770e3 /shlibs/mount/src/context.c | |
parent | libmount: fix to work with btrfs subvolume user mounts (diff) | |
download | kernel-qcow2-util-linux-77417bc00d76086d3cb5876f6fd52d5369c918a4.tar.gz kernel-qcow2-util-linux-77417bc00d76086d3cb5876f6fd52d5369c918a4.tar.xz kernel-qcow2-util-linux-77417bc00d76086d3cb5876f6fd52d5369c918a4.zip |
libmount: remove utab from API, update tests
The utab file is private libmount stuff. Anything about utab should
not be exported by library API.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/context.c')
-rw-r--r-- | shlibs/mount/src/context.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/shlibs/mount/src/context.c b/shlibs/mount/src/context.c index 069a88343..4fe2eabf4 100644 --- a/shlibs/mount/src/context.c +++ b/shlibs/mount/src/context.c @@ -1067,9 +1067,13 @@ int mnt_context_prepare_update(mnt_context *cxt) return 0; } if (!cxt->update) { - cxt->update = mnt_new_update(!cxt->mtab_writable); + cxt->update = mnt_new_update(); if (!cxt->update) return -ENOMEM; + + mnt_update_set_filename(cxt->update, + cxt->mtab_writable ? cxt->mtab_path : cxt->utab_path, + !cxt->mtab_writable); } rc = mnt_update_set_fs(cxt->update, cxt->mountflags, @@ -1081,9 +1085,6 @@ int mnt_context_prepare_update(mnt_context *cxt) int mnt_context_update_tabs(mnt_context *cxt) { - const char *filename; - mnt_lock *lock = NULL; - assert(cxt); if (cxt->flags & MNT_FL_NOMTAB) { @@ -1102,15 +1103,8 @@ int mnt_context_update_tabs(mnt_context *cxt) DBG(CXT, mnt_debug_h(cxt, "don't update: syscall failed")); return 0; } - if (mnt_update_is_userspace_only(cxt->update)) - filename = cxt->utab_path; - else { - filename = cxt->mtab_path; - lock = mnt_context_get_lock(cxt); - } - assert(filename); - return mnt_update_tab(cxt->update, filename, lock); + return mnt_update_tab(cxt->update, mnt_context_get_lock(cxt)); } static int is_remount(mnt_context *cxt) |