dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/0012-libmount-umount-make-mnt_stat_mountpoin-usable-for-r.patch

cbc4cf
From 0afd0613fc738659fb0ff490e4e069366dee4a94 Mon Sep 17 00:00:00 2001
cbc4cf
From: Karel Zak <kzak@redhat.com>
cbc4cf
Date: Mon, 10 Dec 2018 16:25:08 +0100
cbc4cf
Subject: [PATCH 12/14] libmount: (umount) make mnt_stat_mountpoin() usable for
cbc4cf
 relative paths
cbc4cf
cbc4cf
 # mount -o loop devicefile /mnt/test
cbc4cf
 # umount devicefile
cbc4cf
 umount: devicefile: not mounted.
cbc4cf
cbc4cf
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653781
cbc4cf
Upstream: http://github.com/karelzak/util-linux/commit/2859592ecb7b48d47d2e34d589ea35f76e329416
cbc4cf
Signed-off-by: Karel Zak <kzak@redhat.com>
cbc4cf
---
cbc4cf
 libmount/src/utils.c | 2 +-
cbc4cf
 1 file changed, 1 insertion(+), 1 deletion(-)
cbc4cf
cbc4cf
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
cbc4cf
index fd98d0529..c36187c07 100644
cbc4cf
--- a/libmount/src/utils.c
cbc4cf
+++ b/libmount/src/utils.c
cbc4cf
@@ -121,7 +121,7 @@ static int fstype_cmp(const void *v1, const void *v2)
cbc4cf
 int mnt_stat_mountpoint(const char *target, struct stat *st)
cbc4cf
 {
cbc4cf
 #ifdef AT_NO_AUTOMOUNT
cbc4cf
-	return fstatat(-1, target, st, AT_NO_AUTOMOUNT);
cbc4cf
+	return fstatat(AT_FDCWD, target, st, AT_NO_AUTOMOUNT);
cbc4cf
 #else
cbc4cf
 	return stat(target, st);
cbc4cf
 #endif
cbc4cf
-- 
cbc4cf
2.17.2
cbc4cf