1*1a7c1b72Smws#!/bin/sh 2*1a7c1b72Smws# 3*1a7c1b72Smws# CDDL HEADER START 4*1a7c1b72Smws# 5*1a7c1b72Smws# The contents of this file are subject to the terms of the 6*1a7c1b72Smws# Common Development and Distribution License, Version 1.0 only 7*1a7c1b72Smws# (the "License"). You may not use this file except in compliance 8*1a7c1b72Smws# with the License. 9*1a7c1b72Smws# 10*1a7c1b72Smws# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11*1a7c1b72Smws# or http://www.opensolaris.org/os/licensing. 12*1a7c1b72Smws# See the License for the specific language governing permissions 13*1a7c1b72Smws# and limitations under the License. 14*1a7c1b72Smws# 15*1a7c1b72Smws# When distributing Covered Code, include this CDDL HEADER in each 16*1a7c1b72Smws# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17*1a7c1b72Smws# If applicable, add the following below this CDDL HEADER, with the 18*1a7c1b72Smws# fields enclosed by brackets "[]" replaced with your own identifying 19*1a7c1b72Smws# information: Portions Copyright [yyyy] [name of copyright owner] 20*1a7c1b72Smws# 21*1a7c1b72Smws# CDDL HEADER END 22*1a7c1b72Smws# 23*1a7c1b72Smws# 24*1a7c1b72Smws# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 25*1a7c1b72Smws# Use is subject to license terms. 26*1a7c1b72Smws# 27*1a7c1b72Smws#ident "%Z%%M% %I% %E% SMI" 28*1a7c1b72Smws 29*1a7c1b72Smwsecho "\ 30*1a7c1b72Smws/*\n\ 31*1a7c1b72Smws * Copyright 2005 Sun Microsystems, Inc. All rights reserved.\n\ 32*1a7c1b72Smws * Use is subject to license terms.\n\ 33*1a7c1b72Smws */\n\ 34*1a7c1b72Smws\n\ 35*1a7c1b72Smws#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n\ 36*1a7c1b72Smws\n\ 37*1a7c1b72Smws#include <sys/dtrace.h>\n\ 38*1a7c1b72Smws\n\ 39*1a7c1b72Smwsconst char *\n\ 40*1a7c1b72Smwsdof_sec_name(uint32_t type)\n\ 41*1a7c1b72Smws{\n\ 42*1a7c1b72Smws switch (type) {" 43*1a7c1b72Smws 44*1a7c1b72Smwspattern='^#define[ ]DOF_SECT_\([A-Z0-9_]*\)[ ]*.*$' 45*1a7c1b72Smwsreplace=' case DOF_SECT_\1: return ("\1");' 46*1a7c1b72Smws 47*1a7c1b72Smwssed -n "s/$pattern/$replace/p" 48*1a7c1b72Smws 49*1a7c1b72Smwsecho "\ 50*1a7c1b72Smws default: return (NULL);\n\ 51*1a7c1b72Smws }\n\ 52*1a7c1b72Smws}" 53