blob: 4c01c01511234b2047bd6230156ab7d717c7a66e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh -e
#
# Copyright (c) 2015-2021 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: LGPL-2.1-or-later
srcdir="$1"; shift
dstdir="$1"; shift
for n; do
in="$srcdir/syscallent-$n.h"
out="$dstdir/syscallent-$n-stub.h"
sed -E -n '/^#if/,/^#else/ {s/^([^{]*\{[^,]*,[^,]*,[[:space:]]*)[^,[:space:]]+,[[:space:]]*"([^"]+".*)/\1SEN(printargs), SYSCALL_NAME_PREFIX "\2/; s/^\[.*/&/p}' < "$in" > "$out"
done
|