49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#!/bin/ksh -p
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# CDDL HEADER START
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# The contents of this file are subject to the terms of the
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# Common Development and Distribution License (the "License").
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# You may not use this file except in compliance with the License.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# or http://www.opensolaris.org/os/licensing.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# See the License for the specific language governing permissions
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# and limitations under the License.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# When distributing Covered Code, include this CDDL HEADER in each
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# If applicable, add the following below this CDDL HEADER, with the
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# fields enclosed by brackets "[]" replaced with your own identifying
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# information: Portions Copyright [yyyy] [name of copyright owner]
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# CDDL HEADER END
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby# Use is subject to license terms.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbycat <<EOM
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby/*
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby * Use is subject to license terms.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby */
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby/*
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby * This file was generated during make.
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby */
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby#include <fm/libfmevent.h>
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbystatic const char *_fmev_errstrs[] = {
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin MaltbyEOM
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbypattern='^ \(FMEVERR_[A-Z0-9_]*\).*\/\* *\(.*\) *\*\/.*'
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbyreplace=' "\2" \/\* \1 \*\/,'
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbysed -n "s/$pattern/$replace/p" $1 || exit 1
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbycat <<EOM
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby};
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbystatic const int _fmev_nerrs =
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby sizeof (_fmev_errstrs) / sizeof (_fmev_errstrs[0]);
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbyconst char *
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltbyfmev_strerror(fmev_err_t err)
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby{
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby const char *s;
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby if (err >= FMEVERR_UNKNOWN && (err - FMEVERR_UNKNOWN < _fmev_nerrs))
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby s = _fmev_errstrs[err - FMEVERR_UNKNOWN];
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby else
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby s = _fmev_errstrs[0];
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby return (s);
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin Maltby}
49b225e1cfa7bbf7738d4df0a03f18e3283426ebGavin MaltbyEOM