summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2008-04-26 03:44:47 +0000
committerjb <jb@FreeBSD.org>2008-04-26 03:44:47 +0000
commit36ed3b8831ee240c17350d54e10161bce97b0e7f (patch)
tree7a118a70735cc3f39cc74d40d15ab1823eaae309 /cddl
parent221a9b981e83cbc01ee76de47bcea5cee73a65d0 (diff)
downloadFreeBSD-src-36ed3b8831ee240c17350d54e10161bce97b0e7f.zip
FreeBSD-src-36ed3b8831ee240c17350d54e10161bce97b0e7f.tar.gz
On FreeBSD we can't afford to have a build fail simply because there
was some sort of CTF conversion error.
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c b/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
index 16523ff..602969e 100644
--- a/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
+++ b/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
@@ -40,6 +40,9 @@ die(char *format, ...)
{
va_list ap;
int err = errno;
+#if !defined(sun)
+ const char *progname = getprogname();
+#endif
(void) fprintf(stderr, "%s: ", progname);
@@ -51,13 +54,20 @@ die(char *format, ...)
if (format[strlen(format) - 1] != '\n')
(void) fprintf(stderr, ": %s\n", strerror(err));
+#if defined(__FreeBSD__)
+ exit(0);
+#else
exit(1);
+#endif
}
void
elfdie(char *format, ...)
{
va_list ap;
+#if !defined(sun)
+ const char *progname = getprogname();
+#endif
(void) fprintf(stderr, "%s: ", progname);
@@ -69,5 +79,9 @@ elfdie(char *format, ...)
if (format[strlen(format) - 1] != '\n')
(void) fprintf(stderr, ": %s\n", elf_errmsg(elf_errno()));
+#if defined(__FreeBSD__)
+ exit(0);
+#else
exit(1);
+#endif
}
OpenPOWER on IntegriCloud