Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/crash No need for warnx() if !LOCKDEBUG
details: https://anonhg.NetBSD.org/src/rev/b67c32b225ab
branches: trunk
changeset: 1008569:b67c32b225ab
user: ad <ad%NetBSD.org@localhost>
date: Fri Mar 27 00:17:08 2020 +0000
description:
No need for warnx() if !LOCKDEBUG
diffstat:
usr.sbin/crash/crash.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (41 lines):
diff -r 969113c86ff2 -r b67c32b225ab usr.sbin/crash/crash.c
--- a/usr.sbin/crash/crash.c Fri Mar 27 00:14:25 2020 +0000
+++ b/usr.sbin/crash/crash.c Fri Mar 27 00:17:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crash.c,v 1.12 2020/03/09 01:54:31 christos Exp $ */
+/* $NetBSD: crash.c,v 1.13 2020/03/27 00:17:08 ad Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: crash.c,v 1.12 2020/03/09 01:54:31 christos Exp $");
+__RCSID("$NetBSD: crash.c,v 1.13 2020/03/27 00:17:08 ad Exp $");
#endif /* not lint */
#include <ddb/ddb.h>
@@ -427,17 +427,16 @@
errx(EXIT_FAILURE, "cannot read osrelease: %s",
kvm_geterr(kd));
}
-#ifdef LOCKDEBUG
- if ((size_t)kvm_read(kd, nl[X_LOCKDEBUG].n_value, &ld_all,
- sizeof(ld_all)) != sizeof(ld_all))
- warn("Cannot read ld_all (no LOCKDEBUG kernel?): %s",
- kvm_geterr(kd));
-#endif
printf("Crash version %s, image version %s.\n", osrelease, imgrelease);
if (strcmp(osrelease, imgrelease) != 0) {
printf("WARNING: versions differ, you may not be able to "
"examine this image.\n");
}
+#ifdef LOCKDEBUG
+ if ((size_t)kvm_read(kd, nl[X_LOCKDEBUG].n_value, &ld_all,
+ sizeof(ld_all)) != sizeof(ld_all))
+ printf("Kernel compiled without options LOCKDEBUG.\n");
+#endif
/*
* Print the panic string, if any.
Home |
Main Index |
Thread Index |
Old Index