Skip to content

Commit

Permalink
libmount: (umount) make mnt_stat_mountpoin() usable for relative paths
Browse files Browse the repository at this point in the history
 # 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 <[email protected]>
  • Loading branch information
karelzak committed Dec 10, 2018
1 parent 32dae76 commit 2859592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmount/src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2859592

Please sign in to comment.