diff options
author | Karel Zak | 2010-12-22 13:12:57 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-03 12:28:48 +0100 |
commit | 29be59e9f136f0839032b0a784333ed32ee1009d (patch) | |
tree | 49d2e4769ce69533b467e8c1ed52468e71ff2f3e /mount/umount.c | |
parent | mount: rewrite HAVE_LIBMOUNT_MOUNT code (diff) | |
download | kernel-qcow2-util-linux-29be59e9f136f0839032b0a784333ed32ee1009d.tar.gz kernel-qcow2-util-linux-29be59e9f136f0839032b0a784333ed32ee1009d.tar.xz kernel-qcow2-util-linux-29be59e9f136f0839032b0a784333ed32ee1009d.zip |
umount: add HAVE_LIBMOUNT_MOUNT code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/umount.c')
-rw-r--r-- | mount/umount.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mount/umount.c b/mount/umount.c index e76265381..7e4eff77a 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -335,7 +335,19 @@ umount_one (const char *spec, const char *node, const char *type, writemtab: if (!nomtab && (umnt_err == 0 || umnt_err == EINVAL || umnt_err == ENOENT)) { +#ifdef HAVE_LIBMOUNT_MOUNT + mnt_update *upd = mnt_new_update(); + + if (upd && !mnt_update_set_fs(upd, 0, node, NULL)) { + mnt_lock *lc = init_libmount_lock( + mnt_update_get_filename(upd)); + mnt_update_tab(upd, lc); + init_libmount_lock(NULL); + } + mnt_free_update(upd); +#else update_mtab (node, NULL); +#endif } if (res >= 0) |