From: cgoesche Date: Sat, 23 Aug 2025 01:01:16 +0000 (-0400) Subject: fstrim: use F_TYPE_EQUAL() macro for statfs.f_type comparison X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f33a29bfb900426b9c6261b460f008f3dc87f58;p=thirdparty%2Futil-linux.git fstrim: use F_TYPE_EQUAL() macro for statfs.f_type comparison Addresses: #2332 Signed-off-by: Christian Goeschel Ndjomouo --- diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c index 4d43c7957..0e31e7e57 100644 --- a/sys-utils/fstrim.c +++ b/sys-utils/fstrim.c @@ -234,7 +234,7 @@ static int is_unwanted_fs(struct libmnt_fs *fs, const char *tgt, const char *typ fd = open(tgt, O_PATH); if (fd < 0) return 1; - rc = fstatfs(fd, &vfs) != 0 || vfs.f_type == STATFS_AUTOFS_MAGIC; + rc = fstatfs(fd, &vfs) != 0 || F_TYPE_EQUAL(vfs.f_type, STATFS_AUTOFS_MAGIC); close(fd); if (rc) return 1;