Changeset View
Changeset View
Standalone View
Standalone View
cddl/contrib/opensolaris/lib/libdtrace/common/mknames.sh
Show All 18 Lines | |||||
# information: Portions Copyright [yyyy] [name of copyright owner] | # information: Portions Copyright [yyyy] [name of copyright owner] | ||||
# | # | ||||
# CDDL HEADER END | # CDDL HEADER END | ||||
# | # | ||||
# | # | ||||
# Copyright 2005 Sun Microsystems, Inc. All rights reserved. | # Copyright 2005 Sun Microsystems, Inc. All rights reserved. | ||||
# Use is subject to license terms. | # Use is subject to license terms. | ||||
# | # | ||||
#ident "%Z%%M% %I% %E% SMI" | |||||
set -e | set -e | ||||
BSDECHO=-e | printf "%s" " | ||||
/* | |||||
* Copyright 2005 Sun Microsystems, Inc. All rights reserved. | |||||
* Use is subject to license terms. | |||||
*/ | |||||
echo ${BSDECHO} "\ | #include <dtrace.h> | ||||
/*\n\ | |||||
* Copyright 2005 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\ | |||||
\n\ | |||||
#include <dtrace.h>\n\ | |||||
\n\ | |||||
/*ARGSUSED*/ | /*ARGSUSED*/ | ||||
const char *\n\ | const char * | ||||
dtrace_subrstr(dtrace_hdl_t *dtp, int subr)\n\ | dtrace_subrstr(dtrace_hdl_t *dtp, int subr) | ||||
{\n\ | { | ||||
switch (subr) {" | switch (subr) { | ||||
" | |||||
nawk ' | nawk ' | ||||
/^#define[ ]*DIF_SUBR_/ && $2 != "DIF_SUBR_MAX" { | /^#define[ ]*DIF_SUBR_/ && $2 != "DIF_SUBR_MAX" { | ||||
printf("\tcase %s: return (\"%s\");\n", $2, tolower(substr($2, 10))); | printf("\tcase %s: return (\"%s\");\n", $2, tolower(substr($2, 10))); | ||||
}' | }' | ||||
echo ${BSDECHO} "\ | printf "%s" " | ||||
default: return (\"unknown\");\n\ | default: return (\"unknown\"); | ||||
}\n\ | } | ||||
}" | } | ||||
" |