1178479Sjb#!/bin/sh 2178479Sjb# 3178479Sjb# CDDL HEADER START 4178479Sjb# 5178479Sjb# The contents of this file are subject to the terms of the 6178479Sjb# Common Development and Distribution License, Version 1.0 only 7178479Sjb# (the "License"). You may not use this file except in compliance 8178479Sjb# with the License. 9178479Sjb# 10178479Sjb# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11178479Sjb# or http://www.opensolaris.org/os/licensing. 12178479Sjb# See the License for the specific language governing permissions 13178479Sjb# and limitations under the License. 14178479Sjb# 15178479Sjb# When distributing Covered Code, include this CDDL HEADER in each 16178479Sjb# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17178479Sjb# If applicable, add the following below this CDDL HEADER, with the 18178479Sjb# fields enclosed by brackets "[]" replaced with your own identifying 19178479Sjb# information: Portions Copyright [yyyy] [name of copyright owner] 20178479Sjb# 21178479Sjb# CDDL HEADER END 22178479Sjb# 23178479Sjb# 24178479Sjb# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 25178479Sjb# Use is subject to license terms. 26178479Sjb# 27178479Sjb#ident "%Z%%M% %I% %E% SMI" 28178479Sjb 29178547SjbBSDECHO=-e 30178547Sjb 31178547Sjbecho ${BSDECHO} "\ 32178479Sjb/*\n\ 33178479Sjb * Copyright 2005 Sun Microsystems, Inc. All rights reserved.\n\ 34178479Sjb * Use is subject to license terms.\n\ 35178479Sjb */\n\ 36178479Sjb\n\ 37178479Sjb#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n\ 38178479Sjb\n\ 39178479Sjb#include <dtrace.h>\n\ 40178479Sjb\n\ 41178479Sjb/*ARGSUSED*/ 42178479Sjbconst char *\n\ 43178479Sjbdtrace_subrstr(dtrace_hdl_t *dtp, int subr)\n\ 44178479Sjb{\n\ 45178479Sjb switch (subr) {" 46178479Sjb 47178479Sjbnawk ' 48178479Sjb/^#define[ ]*DIF_SUBR_/ && $2 != "DIF_SUBR_MAX" { 49178479Sjb printf("\tcase %s: return (\"%s\");\n", $2, tolower(substr($2, 10))); 50178479Sjb}' 51178479Sjb 52178547Sjbecho ${BSDECHO} "\ 53178479Sjb default: return (\"unknown\");\n\ 54178479Sjb }\n\ 55178479Sjb}" 56