Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sbin/savecore pull up 1.41 (approved by jhawk):



details:   https://anonhg.NetBSD.org/src/rev/41c3ed4948b1
branches:  netbsd-1-5
changeset: 488941:41c3ed4948b1
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Aug 07 01:11:19 2000 +0000

description:
pull up 1.41 (approved by jhawk):
>time is a `struct timeval' not a `time_t', so read it in properly.

diffstat:

 sbin/savecore/savecore.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 2aee0ac8322a -r 41c3ed4948b1 sbin/savecore/savecore.c
--- a/sbin/savecore/savecore.c  Mon Aug 07 01:09:24 2000 +0000
+++ b/sbin/savecore/savecore.c  Mon Aug 07 01:11:19 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: savecore.c,v 1.40 1999/08/02 00:33:01 mycroft Exp $    */
+/*     $NetBSD: savecore.c,v 1.40.8.1 2000/08/07 01:11:19 mrg 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.40 1999/08/02 00:33:01 mycroft Exp $");
+__RCSID("$NetBSD: savecore.c,v 1.40.8.1 2000/08/07 01:11:19 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -584,13 +584,15 @@
 int
 get_crashtime()
 {
+       struct timeval time;
        time_t dumptime;                        /* Time the dump was taken. */
 
-       if (KREAD(kd_dump, dump_nl[X_TIME].n_value, &dumptime) != 0) {
+       if (KREAD(kd_dump, dump_nl[X_TIME].n_value, &time) != 0) {
                if (verbose)
                    syslog(LOG_WARNING, "kvm_read: %s", kvm_geterr(kd_dump));
                return (0);
        }
+       dumptime = time.tv_sec;
        if (dumptime == 0) {
                if (verbose)
                        syslog(LOG_ERR, "dump time is zero");



Home | Main Index | Thread Index | Old Index