diff options
Diffstat (limited to 'linux/errors.mk')
-rw-r--r-- | linux/errors.mk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/errors.mk b/linux/errors.mk index f69bf73..b34258a 100644 --- a/linux/errors.mk +++ b/linux/errors.mk @@ -17,7 +17,7 @@ generated/linux-errors.tbl: $(LINUX_SOURCE) linux/errors.mk printf '%s\n' "$$file"; \ done \ done \ - ) | grep '/\(gcc\|clang\)\(-[0-9.]\+\)\?$$'; \ + ) | grep '/\(gcc\|clang\)\(-[0-9.]\{1,\}\)\{0,1\}$$'; \ printf '%s\n' gcc; \ ) | sed 1q; \ }; \ @@ -27,7 +27,7 @@ generated/linux-errors.tbl: $(LINUX_SOURCE) linux/errors.mk { \ ($$extract "-I$$toolsdir/include/uapi" "$$2" && \ cat -- "linux-src/linux-$(LINUX_VERSION)/include/linux/errno.h") \ - | sed -n 's/^\s*\x23\s*define\s\+\(E[^\s]\+\)\s\+\([0-9]\+\)\s*\(\/.*\)\?$$/'"$$1"' \2 \1/p' \ + | sed -n 's/^$(s)*$(h)$(s)*define$(s)\{1,\}\(E[^[:space:]]\{1,\}\)$(s)\{1,\}\([0-9]\{1,\}\)$(s)*\(\/.*\)\{0,1\}$$/'"$$1"' \2 \1/p' \ | sort -k 2 -nu; \ }; \ for arch in $$(printf '%s\n' "$$toolsdir/arch"/*/ | sed 's:^.*/\([^/]*\)/$$:\1:'); do \ @@ -43,7 +43,7 @@ generated/linux-errors.h: generated/linux-errors.tbl linux/errors.mk for arch in $$(cut -d ' ' -f 1 < generated/linux-errors.tbl | uniq); do \ ARCH="$$(printf '%s\n' "$$arch" | tr '[a-z]' '[A-Z]')"; \ printf '#define LIST_LINUX_ERRORS_FOR_%s(X, D)\\\n' "$$ARCH"; \ - sed -n 's/^'"$$arch"' \([0-9]\+\) \(.*\)$$/\tX(\1, "\2") D\\/p' \ + sed -n 's/^'"$$arch"' \([0-9]\{1,\}\) \(.*\)$$/\tX(\1, "\2") D\\/p' \ < generated/linux-errors.tbl \ | sed '$$s/ D\\//'; \ printf 'static struct libsyscalls_named_number linux_errors_for_%s[] = {\n' "$$arch"; \ |