fstrim: fix paths comparison

Fix: https://github.com/karelzak/util-linux/issues/1312
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-05-20 09:25:46 +02:00
parent 842ec4ce6b
commit 3e8403522c
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ static int fstrim_all_from_file(struct fstrim_control *ctl, const char *filename
/* Is it really accessible mountpoint? Not all mountpoints are
* accessible (maybe over mounted by another filesystem) */
path = mnt_get_mountpoint(tgt);
if (path && strcmp(path, tgt) == 0)
if (path && streq_paths(path, tgt))
rc = 0;
free(path);
if (rc)