Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/savecore Output proper warning if dumplo == -1 (as it c...
details: https://anonhg.NetBSD.org/src/rev/be3be752b2f0
branches: trunk
changeset: 500240:be3be752b2f0
user: wiz <wiz%NetBSD.org@localhost>
date: Fri Dec 08 22:03:23 2000 +0000
description:
Output proper warning if dumplo == -1 (as it can happen on macppc without
swap partition), instead of "kvm_dump_mkheader: Pread: Invalid argument".
diffstat:
sbin/savecore/savecore.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r fb24d75f730d -r be3be752b2f0 sbin/savecore/savecore.c
--- a/sbin/savecore/savecore.c Fri Dec 08 21:51:35 2000 +0000
+++ b/sbin/savecore/savecore.c Fri Dec 08 22:03:23 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: savecore.c,v 1.45 2000/12/07 03:55:44 wiz Exp $ */
+/* $NetBSD: savecore.c,v 1.46 2000/12/08 22:03:23 wiz Exp $ */
/*-
* Copyright (c) 1986, 1992, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)savecore.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: savecore.c,v 1.45 2000/12/07 03:55:44 wiz Exp $");
+__RCSID("$NetBSD: savecore.c,v 1.46 2000/12/08 22:03:23 wiz Exp $");
#endif
#endif /* not lint */
@@ -280,6 +280,10 @@
syslog(LOG_WARNING, "kvm_read: %s", kvm_geterr(kd_kern));
exit(1);
}
+ if (dumplo == -1) {
+ syslog(LOG_WARNING, "no core dump (invalid dumplo)");
+ exit(1);
+ }
dumplo *= DEV_BSIZE;
if (verbose)
(void)printf("dumplo = %ld (%ld * %ld)\n",
Home |
Main Index |
Thread Index |
Old Index