summaryrefslogtreecommitdiffstats
path: root/libmount/src
diff options
context:
space:
mode:
authorKarel Zak2018-12-10 16:25:08 +0100
committerKarel Zak2018-12-10 16:25:08 +0100
commit2859592ecb7b48d47d2e34d589ea35f76e329416 (patch)
treebb699162fb96835cf76a8b1ffca8811a4e69995e /libmount/src
parentumount: fix --quiet (diff)
downloadkernel-qcow2-util-linux-2859592ecb7b48d47d2e34d589ea35f76e329416.tar.gz
kernel-qcow2-util-linux-2859592ecb7b48d47d2e34d589ea35f76e329416.tar.xz
kernel-qcow2-util-linux-2859592ecb7b48d47d2e34d589ea35f76e329416.zip
libmount: (umount) make mnt_stat_mountpoin() usable for relative paths
# mount -o loop devicefile /mnt/test # umount devicefile umount: devicefile: not mounted. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653781 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src')
-rw-r--r--libmount/src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
index 4f4d10bf9..6d8871717 100644
--- a/libmount/src/utils.c
+++ b/libmount/src/utils.c
@@ -126,7 +126,7 @@ static int fstype_cmp(const void *v1, const void *v2)
int mnt_stat_mountpoint(const char *target, struct stat *st)
{
#ifdef AT_NO_AUTOMOUNT
- return fstatat(-1, target, st, AT_NO_AUTOMOUNT);
+ return fstatat(AT_FDCWD, target, st, AT_NO_AUTOMOUNT);
#else
return stat(target, st);
#endif