aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd/mdb
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>2008-04-26 03:44:47 +0000
committerJohn Birrell <jb@FreeBSD.org>2008-04-26 03:44:47 +0000
commit9f1fe401d93a3361cc7f0bf5c0948cc6a0060f32 (patch)
tree7a118a70735cc3f39cc74d40d15ab1823eaae309 /cddl/contrib/opensolaris/cmd/mdb
parent0bf4507c08d54f8de4bd4eb86487c0205ef3215c (diff)
downloadsrc-9f1fe401d93a3361cc7f0bf5c0948cc6a0060f32.tar.gz
src-9f1fe401d93a3361cc7f0bf5c0948cc6a0060f32.zip
On FreeBSD we can't afford to have a build fail simply because there
was some sort of CTF conversion error.
Notes
Notes: svn path=/head/; revision=178539
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/mdb')
-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 16523ff24d57..602969e1abb3 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
}