From d35e5fb09bfac1fa381e4ed004ea24a6025e36f4 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Fri, 1 Apr 2022 14:08:42 +0200 Subject: Bump to go 1.17 and update all dependencies --- vendor/golang.org/x/sys/windows/mkerrors.bash | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'vendor/golang.org/x/sys/windows/mkerrors.bash') diff --git a/vendor/golang.org/x/sys/windows/mkerrors.bash b/vendor/golang.org/x/sys/windows/mkerrors.bash index a70b24f..58e0188 100644 --- a/vendor/golang.org/x/sys/windows/mkerrors.bash +++ b/vendor/golang.org/x/sys/windows/mkerrors.bash @@ -7,14 +7,15 @@ set -e shopt -s nullglob -[[ $# -eq 1 ]] || { echo "Usage: $0 OUTPUT_FILE.go" >&2; exit 1; } winerror="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/winerror.h | sort -Vr | head -n 1)" [[ -n $winerror ]] || { echo "Unable to find winerror.h" >&2; exit 1; } +ntstatus="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/ntstatus.h | sort -Vr | head -n 1)" +[[ -n $ntstatus ]] || { echo "Unable to find ntstatus.h" >&2; exit 1; } declare -A errors { - echo "// Code generated by 'go generate'; DO NOT EDIT." + echo "// Code generated by 'mkerrors.bash'; DO NOT EDIT." echo echo "package windows" echo "import \"syscall\"" @@ -60,5 +61,10 @@ declare -A errors echo "$key $vtype = $value" done < "$winerror" + while read -r line; do + [[ $line =~ ^#define\ (STATUS_[^\s]+)\ +\(\(NTSTATUS\)((0x)?[0-9a-fA-F]+)L?\) ]] || continue + echo "${BASH_REMATCH[1]} NTStatus = ${BASH_REMATCH[2]}" + done < "$ntstatus" + echo ")" -} | gofmt > "$1" +} | gofmt > "zerrors_windows.go" -- cgit v1.3.1