1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#!/bin/sh
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# CDDL HEADER START
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# The contents of this file are subject to the terms of the
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# Common Development and Distribution License, Version 1.0 only
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# (the "License"). You may not use this file except in compliance
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# with the License.
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# or http://www.opensolaris.org/os/licensing.
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# See the License for the specific language governing permissions
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# and limitations under the License.
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# When distributing Covered Code, include this CDDL HEADER in each
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# If applicable, add the following below this CDDL HEADER, with the
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# fields enclosed by brackets "[]" replaced with your own identifying
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# information: Portions Copyright [yyyy] [name of copyright owner]
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# CDDL HEADER END
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws# Use is subject to license terms.
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#ident "%Z%%M% %I% %E% SMI"
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmwsecho "\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws/*\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws * Copyright 2005 Sun Microsystems, Inc. All rights reserved.\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws * Use is subject to license terms.\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws */\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws#include <sys/dtrace.h>\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmwsconst char *\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmwsdof_sec_name(uint32_t type)\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws{\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws switch (type) {"
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmwspattern='^#define[ ]DOF_SECT_\([A-Z0-9_]*\)[ ]*.*$'
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmwsreplace=' case DOF_SECT_\1: return ("\1");'
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmwssed -n "s/$pattern/$replace/p"
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmwsecho "\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws default: return (NULL);\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws }\n\
1a7c1b724419d3cb5fa6eea75123c6b2060ba31bmws}"