From 14889cd96e524db28ade2f19840bb7311ff0b793 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Mon, 22 Apr 2024 10:43:56 +0000 Subject: sndiod: Hide forgotten debug printfs --- usr.bin/sndiod/dev_sioctl.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/sndiod/dev_sioctl.c b/usr.bin/sndiod/dev_sioctl.c index 45f6f5f641f..907f49267b0 100644 --- a/usr.bin/sndiod/dev_sioctl.c +++ b/usr.bin/sndiod/dev_sioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_sioctl.c,v 1.7 2021/03/03 10:00:27 ratchov Exp $ */ +/* $OpenBSD: dev_sioctl.c,v 1.8 2024/04/22 10:43:55 ratchov Exp $ */ /* * Copyright (c) 2014-2020 Alexandre Ratchov * @@ -81,20 +81,26 @@ dev_sioctl_onval(void *arg, unsigned int addr, unsigned int val) struct dev *d = arg; struct ctl *c; - dev_log(d); - log_puts(": onctl: addr = "); - log_putu(addr); - log_puts(", val = "); - log_putu(val); - log_puts("\n"); + if (log_level >= 2) { + dev_log(d); + log_puts(": onctl: addr = "); + log_putu(addr); + log_puts(", val = "); + log_putu(val); + log_puts("\n"); + } for (c = ctl_list; c != NULL; c = c->next) { if (c->scope != CTL_HW || c->u.hw.addr != addr) continue; - ctl_log(c); - log_puts(": new value -> "); - log_putu(val); - log_puts("\n"); + + if (log_level >= 2) { + ctl_log(c); + log_puts(": new value -> "); + log_putu(val); + log_puts("\n"); + } + c->val_mask = ~0U; c->curval = val; } -- cgit v1.2.3