summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/cmd/mdb
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2008-04-26 00:54:52 +0000
committerjb <jb@FreeBSD.org>2008-04-26 00:54:52 +0000
commit52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50 (patch)
treec98db398653c7c531756a3578af91819cb574281 /cddl/contrib/opensolaris/cmd/mdb
parentcb8ce777270daa16660da8e87ef6a11d5bc5408f (diff)
downloadFreeBSD-src-52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50.zip
FreeBSD-src-52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50.tar.gz
Vendor import of the full userland contrib part of DTrace support from
OpenSolaris. This commit resets files to match the versions in the OpenSolaris tree as of 2008/04/10. The changes in this import from the previous import are the ones that will subsequently re-applied to take files off the vendor branch. This is unfortunately necessary because the Solaris developers won't allow FreeBSD support #ifdefs in their source code because that creates 'dead code' (stuff that they never compile).
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/mdb')
-rw-r--r--cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c14
-rw-r--r--cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h2
2 files changed, 0 insertions, 16 deletions
diff --git a/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c b/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
index 602969e..16523ff 100644
--- a/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
+++ b/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c
@@ -40,9 +40,6 @@ die(char *format, ...)
{
va_list ap;
int err = errno;
-#if !defined(sun)
- const char *progname = getprogname();
-#endif
(void) fprintf(stderr, "%s: ", progname);
@@ -54,20 +51,13 @@ 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);
@@ -79,9 +69,5 @@ 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
}
diff --git a/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h b/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h
index a0932ad..34e191b 100644
--- a/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h
+++ b/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h
@@ -40,9 +40,7 @@ extern int findelfsecidx(Elf *, char *);
extern void die(char *, ...);
extern void elfdie(char *, ...);
-#if defined(sun)
extern const char *progname;
-#endif
#ifdef __cplusplus
}
OpenPOWER on IntegriCloud