diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-12 08:34:19 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-12 08:34:19 -0600 |
commit | ddd3f3982c6cdf8d7d0068e544cc9daf24355d32 (patch) | |
tree | 747821d810bf6ecb97089af088e3946cfc1225ce /lib9p/linux-errno.txt.gen | |
parent | d053a0f6dffc575611324b81acaef0d1554bda6c (diff) | |
parent | e0d67aeb886c75dde8f05120a2d8d1bd2dd2c16c (diff) |
Merge branch 'lukeshu/tidy'
Diffstat (limited to 'lib9p/linux-errno.txt.gen')
-rwxr-xr-x | lib9p/linux-errno.txt.gen | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib9p/linux-errno.txt.gen b/lib9p/linux-errno.txt.gen new file mode 100755 index 0000000..687e58b --- /dev/null +++ b/lib9p/linux-errno.txt.gen @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# lib9p/linux-errno.txt.gen - Generate a listing of Linux kernel errnos +# +# Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com> +# SPDX-License-Identifier: AGPL-3.0-or-later + +set -e +linux_git=${1:?} +outfile=${2:?} + +( + cd "${linux_git}" + echo "# ${outfile} - Generated from $0 and linux.git $(git describe). DO NOT EDIT!" + git ls-files include/uapi/ | grep errno | + xargs sed -nE 's,#\s*define\s+(E[A-Z0-9]+)\s+([0-9]+)\s+/\* (.*) \*/,\2 \1 \3,p' | + sort --numeric-sort +) >"${outfile}" |