From: Karel Zak Date: Thu, 20 May 2021 07:25:46 +0000 (+0200) Subject: fstrim: fix paths comparison X-Git-Tag: v2.37~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e8403522c6e28fa1fa5bdea1462822deb7ce303;p=thirdparty%2Futil-linux.git fstrim: fix paths comparison Fix: https://github.com/karelzak/util-linux/issues/1312 Signed-off-by: Karel Zak --- diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c index e8f0060839..1ca117071a 100644 --- a/sys-utils/fstrim.c +++ b/sys-utils/fstrim.c @@ -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)