From: mpi Date: Mon, 5 Feb 2024 15:11:35 +0000 (+0000) Subject: Print statistics on stderr to be able to redirect bt(5) script output. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7369eb9d35fc5e5b44c3d430e58f929011ba3e50;p=openbsd Print statistics on stderr to be able to redirect bt(5) script output. From Christian Ludwig. --- diff --git a/usr.sbin/btrace/btrace.c b/usr.sbin/btrace/btrace.c index 98c4af36572..ac291a139aa 100644 --- a/usr.sbin/btrace/btrace.c +++ b/usr.sbin/btrace/btrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: btrace.c,v 1.83 2024/01/25 20:50:58 mpi Exp $ */ +/* $OpenBSD: btrace.c,v 1.84 2024/02/05 15:11:35 mpi Exp $ */ /* * Copyright (c) 2019 - 2023 Martin Pieuchot @@ -450,9 +450,9 @@ rules_do(int fd) if (ioctl(fd, DTIOCGSTATS, &dtst)) warn("DTIOCGSTATS"); - printf("%llu events read\n", dtst.dtst_readevt); - printf("%llu events dropped\n", dtst.dtst_dropevt); - printf("%llu events filtered\n", bt_filtered); + fprintf(stderr, "%llu events read\n", dtst.dtst_readevt); + fprintf(stderr, "%llu events dropped\n", dtst.dtst_dropevt); + fprintf(stderr, "%llu events filtered\n", bt_filtered); } }