]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fstrim: check for ENOSYS when using --quiet-unsupported
authorNarthorn <narthorn@gmail.com>
Sat, 7 May 2022 05:43:02 +0000 (07:43 +0200)
committerNarthorn <narthorn@gmail.com>
Sat, 7 May 2022 05:43:02 +0000 (07:43 +0200)
Some filesystems like bindfs report ENOSYS (Function not implemented)
for the trim ioctl, which should be caught by --quiet-unsupported.

sys-utils/fstrim.c

index 0d6cabeb96ba9d6f6dc854423a4c5d9564e9bed5..88333e91db86557b8dd148d22f8bca1956a9f586 100644 (file)
@@ -122,6 +122,7 @@ static int fstrim_filesystem(struct fstrim_control *ctl, const char *path, const
                case EBADF:
                case ENOTTY:
                case EOPNOTSUPP:
+               case ENOSYS:
                        rc = 1;
                        break;
                default: