diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-08-02 13:40:53 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-08-02 13:40:53 +0000 |
commit | 577761e1812fe4592e28db32d4518e8cba986503 (patch) | |
tree | 3fd229f631527cecfed36a148a8b8d4077b143b5 /cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh | |
parent | 796dcddd184bb641110681caa8686cd769bc02ac (diff) | |
parent | 679969c11d8f283ad56fa4b5bbd853cd1e7aa8fa (diff) | |
download | FreeBSD-src-577761e1812fe4592e28db32d4518e8cba986503.zip FreeBSD-src-577761e1812fe4592e28db32d4518e8cba986503.tar.gz |
MFV OpenSolaris DTrace userland bits.
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh')
-rwxr-xr-x | cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh b/cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh new file mode 100755 index 0000000..1bffa64 --- /dev/null +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/mksignal.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +echo "\ +/*\n\ + * Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ + * Use is subject to license terms.\n\ + */\n\ +\n\ +#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" + +pattern='^#define[ ]*_*\(SIG[A-Z0-9]*\)[ ]\{1,\}\([A-Z0-9]*\).*$' +replace='inline int \1 = \2;@#pragma D binding "1.0" \1' + +sed -n "s/$pattern/$replace/p;/SIGRTMAX/q" | tr '@' '\n' |