diff options
| author | Sandro Jäckel <sandro.jaeckel@sap.com> | 2022-04-01 14:08:42 +0200 |
|---|---|---|
| committer | Sandro Jäckel <sandro.jaeckel@sap.com> | 2022-04-01 14:09:09 +0200 |
| commit | d35e5fb09bfac1fa381e4ed004ea24a6025e36f4 (patch) | |
| tree | e47874ed2c6830abf4c84e9068bc187fb041b6b4 /vendor/golang.org/x/sys/windows/mkerrors.bash | |
| parent | cb398f58a5cb4f3e858fe60e84debde6ab58f7c8 (diff) | |
| download | gofu-d35e5fb09bfac1fa381e4ed004ea24a6025e36f4.tar.gz | |
Bump to go 1.17 and update all dependencies
Diffstat (limited to 'vendor/golang.org/x/sys/windows/mkerrors.bash')
| -rw-r--r-- | vendor/golang.org/x/sys/windows/mkerrors.bash | 12 |
1 files changed, 9 insertions, 3 deletions
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" |
