Source-Changes-HG archive

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

[src/trunk]: src/sbin/savecore time is a `struct timeval' not a `time_t', so ...



details:   https://anonhg.NetBSD.org/src/rev/5faf9f93022c
branches:  trunk
changeset: 495604:5faf9f93022c
user:      eeh <eeh%NetBSD.org@localhost>
date:      Tue Aug 01 16:46:27 2000 +0000

description:
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 dd43d5412df2 -r 5faf9f93022c sbin/savecore/savecore.c
--- a/sbin/savecore/savecore.c  Tue Aug 01 15:03:51 2000 +0000
+++ b/sbin/savecore/savecore.c  Tue Aug 01 16:46:27 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.41 2000/08/01 16:46:27 eeh 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.41 2000/08/01 16:46:27 eeh 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