From: Karel Zak Date: Mon, 4 Oct 2021 09:14:01 +0000 (+0200) Subject: fstrim: fix typo X-Git-Tag: v2.38-rc1~233 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e01704bbcdf74d39bd770c6bf1f437674085c8c;p=thirdparty%2Futil-linux.git fstrim: fix typo Addresses: https://github.com/karelzak/util-linux/issues/1463 Signed-off-by: Karel Zak --- diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c index ea787f42cf..88397f0ec3 100644 --- a/sys-utils/fstrim.c +++ b/sys-utils/fstrim.c @@ -226,7 +226,7 @@ static int is_unwanted_fs(struct libmnt_fs *fs, const char *tgt) return 1; fd = open(tgt, O_PATH); - if (!fd) + if (fd < 0) return 1; rc = fstatfs(fd, &vfs) != 0 || vfs.f_type == STATFS_AUTOFS_MAGIC; close(fd);