summaryrefslogtreecommitdiffstats
path: root/tools/net/sunrpc/extract.sh
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2024-10-07 20:07:54 +0200
committerChuck Lever <chuck.lever@oracle.com>2024-11-19 02:22:59 +0100
commita32442f6ca32cf402a76856d5e713bd742481ba2 (patch)
treea147316482e4383764dd7d7917208ad44d877a23 /tools/net/sunrpc/extract.sh
parentnfsd: Fix NFSD_MAY_BYPASS_GSS and NFSD_MAY_BYPASS_GSS_ON_ROOT (diff)
downloadlinux-a32442f6ca32cf402a76856d5e713bd742481ba2.tar.xz
linux-a32442f6ca32cf402a76856d5e713bd742481ba2.zip
xdrgen: Add a utility for extracting XDR from RFCs
For convenience, copy the XDR extraction script from RFC Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to '')
-rwxr-xr-xtools/net/sunrpc/extract.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/net/sunrpc/extract.sh b/tools/net/sunrpc/extract.sh
new file mode 100755
index 000000000000..f944066f25bc
--- /dev/null
+++ b/tools/net/sunrpc/extract.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+# SPDX-License-Identifier: GPL-2.0
+#
+# Extract an RPC protocol specification from an RFC document.
+# The version of this script comes from RFC 8166.
+#
+# Usage:
+# $ extract.sh < rfcNNNN.txt > protocol.x
+#
+
+grep '^ *///' | sed 's?^ */// ??' | sed 's?^ *///$??'