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 2003 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 2003 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 <dt_errtags.h> 40178479Sjb\n\ 41178479Sjbstatic const char *const _dt_errtags[] = {" 42178479Sjb 43178479Sjbpattern='^ \(D_[A-Z0-9_]*\),*' 44178479Sjbreplace=' "\1",' 45178479Sjb 46178479Sjbsed -n "s/$pattern/$replace/p" || exit 1 47178479Sjb 48178547Sjbecho ${BSDECHO} "\ 49178479Sjb};\n\ 50178479Sjb\n\ 51178479Sjbstatic const int _dt_ntag = sizeof (_dt_errtags) / sizeof (_dt_errtags[0]);\n\ 52178479Sjb\n\ 53178479Sjbconst char * 54178479Sjbdt_errtag(dt_errtag_t tag) 55178479Sjb{ 56178479Sjb return (_dt_errtags[(tag > 0 && tag < _dt_ntag) ? tag : 0]); 57178479Sjb}" 58178479Sjb 59178479Sjbexit 0 60