errno-list: filter out EFSBADCRC and EFSCORRUPTED

These are introduced in kernel v7.0.
This commit is contained in:
Yu Watanabe
2026-02-24 12:58:09 +00:00
committed by Luca Boccassi
parent a11f07d78c
commit 3cfb169988
+7 -3
View File
@@ -3,12 +3,16 @@
set -eu
set -o pipefail
# In kernel's arch/parisc/include/uapi/asm/errno.h, ECANCELLED and EREFUSED are defined as aliases of
# ECANCELED and ECONNREFUSED, respectively. Let's drop them.
# In kernel's arch/parisc/include/uapi/asm/errno.h, The following aliases are defined:
# ECANCELLED → ECANCELED
# EREFUSED → ECONNREFUSED
# EFSBADCRC → EBADMSG
# EFSCORRUPTED → EUCLEAN
# Let's drop them.
CC=${1:?}
shift
$CC -dM -include errno.h "$@" - </dev/null | \
grep -Ev '^#define[[:space:]]+(ECANCELLED|EREFUSED)' | \
grep -Ev '^#define[[:space:]]+(ECANCELLED|EREFUSED|EFSBADCRC|EFSCORRUPTED)' | \
awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }'