From: dlg Date: Fri, 22 Apr 2022 00:29:20 +0000 (+0000) Subject: handle 16 bit kstat_kv types X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3564cc7fce236bf95d323e3a6a1e687948c8f19b;p=openbsd handle 16 bit kstat_kv types --- 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;