]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
umount: (recursive) add a cache to the table
authorDave Reisner <dreisner@archlinux.org>
Fri, 16 Nov 2012 04:18:07 +0000 (23:18 -0500)
committerKarel Zak <kzak@redhat.com>
Fri, 16 Nov 2012 09:41:36 +0000 (10:41 +0100)
Without this table libmount will not resolve paths, meaning that
umounting by relative path will fail.

[kzak@redhat.com: - use mnt_context_get_cache() to make it sensitive
                    to --no-canonicalize cmdline option]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/umount.c

index b21e39674029533cdffa9dc8b8c52da2bcd616cb..06d33de1d71154bbfd662c9bcde08c074a4bba14 100644 (file)
@@ -374,6 +374,8 @@ static int umount_recursive(struct libmnt_context *cxt, const char *spec)
                err(MOUNT_EX_SYSERR, _("libmount table allocation failed"));
        mnt_table_set_parser_errcb(tb, table_parser_errcb);
 
+       mnt_table_set_cache(tb, mnt_context_get_cache(cxt));
+
        /*
         * Don't use mtab here. The recursive umount depends on child-parent
         * relationship defined by mountinfo file.