From ffed78fe948f3203bab38c3418b8f513bb61f4e7 Mon Sep 17 00:00:00 2001 From: pluknet Date: Mon, 25 Nov 2013 22:55:47 +0000 Subject: [PATCH] iostat: fix extracting TTY statistics from core. MFC after: 1 week --- usr.sbin/iostat/iostat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index 92b98e46229e..f566f39036b3 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -117,10 +117,10 @@ #include struct nlist namelist[] = { -#define X_TK_NIN 0 - { "_tk_nin" }, -#define X_TK_NOUT 1 - { "_tk_nout" }, +#define X_TTY_NIN 0 + { "_tty_nin" }, +#define X_TTY_NOUT 1 + { "_tty_nout" }, #define X_BOOTTIME 2 { "_boottime" }, #define X_END 2 @@ -448,9 +448,9 @@ main(int argc, char **argv) long double etime; if (Tflag > 0) { - if ((readvar(kd, "kern.tty_nin", X_TK_NIN, &cur.tk_nin, + if ((readvar(kd, "kern.tty_nin", X_TTY_NIN, &cur.tk_nin, sizeof(cur.tk_nin)) != 0) - || (readvar(kd, "kern.tty_nout", X_TK_NOUT, + || (readvar(kd, "kern.tty_nout", X_TTY_NOUT, &cur.tk_nout, sizeof(cur.tk_nout))!= 0)) { Tflag = 0; warnx("disabling TTY statistics");