From 3564cc7fce236bf95d323e3a6a1e687948c8f19b Mon Sep 17 00:00:00 2001 From: dlg Date: Fri, 22 Apr 2022 00:29:20 +0000 Subject: [PATCH] handle 16 bit kstat_kv types --- usr.bin/kstat/kstat.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.bin/kstat/kstat.c b/usr.bin/kstat/kstat.c index 45081540d5e..166d55e3074 100644 --- a/usr.bin/kstat/kstat.c +++ b/usr.bin/kstat/kstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kstat.c,v 1.8 2021/01/25 06:55:59 dlg Exp $ */ +/* $OpenBSD: kstat.c,v 1.9 2022/04/22 00:29:20 dlg Exp $ */ /* * Copyright (c) 2020 David Gwynne @@ -381,6 +381,13 @@ kstat_kv(const void *d, ssize_t len) case KSTAT_KV_T_INT32: printf("%" PRId32, kstat_kv_s32(kv)); break; + case KSTAT_KV_T_COUNTER16: + case KSTAT_KV_T_UINT16: + printf("%" PRIu16, kstat_kv_u16(kv)); + break; + case KSTAT_KV_T_INT16: + printf("%" PRId16, kstat_kv_s16(kv)); + break; case KSTAT_KV_T_STR: blen = kstat_kv_len(kv); trailer = strdumpnl; -- 2.20.1