diff --git a/cmdline/support.c b/cmdline/support.c index 8d4c7f56..316dd981 100644 --- a/cmdline/support.c +++ b/cmdline/support.c @@ -1120,10 +1120,7 @@ int advise_write(struct advise_struct* advise, int f, data_off_t offset, data_of /* flush the data from the cache */ ret = posix_fadvise(f, discard_offset, discard_size, POSIX_FADV_DONTNEED); - if (ret == ENOSYS) { - /* call is not supported, like in armhf, see posix_fadvise manpage */ - ret = 0; - } + /* for POSIX_FADV_DONTNEED we don't allow failure with ENOSYS */ if (ret != 0) { /* LCOV_EXCL_START */ errno = ret; /* posix_fadvise return the error code */ @@ -1151,10 +1148,7 @@ int advise_read(struct advise_struct* advise, int f, data_off_t offset, data_off /* flush the data from the cache */ ret = posix_fadvise(f, offset, size, POSIX_FADV_DONTNEED); - if (ret == ENOSYS) { - /* call is not supported, like in armhf, see posix_fadvise manpage */ - ret = 0; - } + /* for POSIX_FADV_DONTNEED we don't allow failure with ENOSYS */ if (ret != 0) { /* LCOV_EXCL_START */ errno = ret; /* posix_fadvise return the error code */