Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/vmstat Adapt to new version of the sysctl export str...



details:   https://anonhg.NetBSD.org/src/rev/0e3e6dad8d31
branches:  trunk
changeset: 820226:0e3e6dad8d31
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Jan 04 01:06:26 2017 +0000

description:
Adapt to new version of the sysctl export structure

diffstat:

 usr.bin/vmstat/vmstat.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (34 lines):

diff -r 7618383a883e -r 0e3e6dad8d31 usr.bin/vmstat/vmstat.c
--- a/usr.bin/vmstat/vmstat.c   Wed Jan 04 01:05:58 2017 +0000
+++ b/usr.bin/vmstat/vmstat.c   Wed Jan 04 01:06:26 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.212 2017/01/02 09:24:54 pgoyette Exp $ */
+/* $NetBSD: vmstat.c,v 1.213 2017/01/04 01:06:26 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
 #if 0
 static char sccsid[] = "@(#)vmstat.c   8.2 (Berkeley) 3/1/95";
 #else
-__RCSID("$NetBSD: vmstat.c,v 1.212 2017/01/02 09:24:54 pgoyette Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.213 2017/01/04 01:06:26 pgoyette Exp $");
 #endif
 #endif /* not lint */
 
@@ -2232,11 +2232,10 @@
                if (e->she_fmtoffset != 0) {
                        fmt = &strp[e->she_fmtoffset];
                        fn = &strp[e->she_funcoffset];
-                       (void)printf("%06ld.%06ld ",
-                           (long int)e->she_tspec.tv_sec,
-                           (long int)(e->she_tspec.tv_nsec / 1000));
-                       (void)printf("%s#%"PRIu64"@%"PRIu32": ", fn,
-                           e->she_callnumber, e->she_cpunum);
+                       (void)printf("%06ld.%06ld %s#%"PRIu64"@%"PRIu32": ",
+                           (long int)e->she_time_sec,
+                           (long int)e->she_time_usec,
+                           fn, e->she_callnumber, e->she_cpunum);
                        (void)printf(fmt, e->she_values[0], e->she_values[1],
                             e->she_values[2], e->she_values[3]);
                        (void)putchar('\n');



Home | Main Index | Thread Index | Old Index