aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh')
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh33
1 files changed, 15 insertions, 18 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh b/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh
index cc3ef3cc9617..11b327cbff17 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh
@@ -24,37 +24,34 @@
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
set -e
-BSDECHO=-e
+printf "%s" "
+/*
+ * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
-echo ${BSDECHO} "\
-/*\n\
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\
- * Use is subject to license terms.\n\
- */\n\
-\n\
-#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n\
-\n\
#include <dt_errtags.h>
-\n\
-static const char *const _dt_errtags[] = {"
+
+static const char *const _dt_errtags[] = {
+"
pattern='^ \(D_[A-Z0-9_]*\),*'
replace=' "\1",'
sed -n "s/$pattern/$replace/p" || exit 1
-echo ${BSDECHO} "\
-};\n\
-\n\
-static const int _dt_ntag = sizeof (_dt_errtags) / sizeof (_dt_errtags[0]);\n\
-\n\
+printf "%s" "
+};
+
+static const int _dt_ntag = sizeof (_dt_errtags) / sizeof (_dt_errtags[0]);
+
const char *
dt_errtag(dt_errtag_t tag)
{
return (_dt_errtags[(tag > 0 && tag < _dt_ntag) ? tag : 0]);
-}"
+}
+"
exit 0