summaryrefslogtreecommitdiff
path: root/3rd-party/linux-errno.txt.gen
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-24 09:51:37 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-24 09:51:37 -0600
commitd559c50a98e65ce889411b46ab108b392907e0f0 (patch)
treee38f83c11ae43f48aadead70f180be30df2bab78 /3rd-party/linux-errno.txt.gen
parentfbd945a03f2d706bb4d62aab6a607c1694d6d77a (diff)
wip 9p
Diffstat (limited to '3rd-party/linux-errno.txt.gen')
-rwxr-xr-x3rd-party/linux-errno.txt.gen14
1 files changed, 14 insertions, 0 deletions
diff --git a/3rd-party/linux-errno.txt.gen b/3rd-party/linux-errno.txt.gen
new file mode 100755
index 0000000..b03a67e
--- /dev/null
+++ b/3rd-party/linux-errno.txt.gen
@@ -0,0 +1,14 @@
+#!/bin/sh
+# 3rd-party/linux-errno.txt.gen - Generate a listing of Linux kernel errnos
+#
+# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
+# SPDX-Licence-Identifier: AGPL-3.0-or-later
+
+set -e
+(
+ cd "$1"
+ echo "# ${0%.gen} - Generated from 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
+) >"${0%.gen}"