From 3f33a29bfb900426b9c6261b460f008f3dc87f58 Mon Sep 17 00:00:00 2001 From: cgoesche Date: Fri, 22 Aug 2025 21:01:16 -0400 Subject: [PATCH] fstrim: use F_TYPE_EQUAL() macro for statfs.f_type comparison Addresses: #2332 Signed-off-by: Christian Goeschel Ndjomouo --- sys-utils/fstrim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3