diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-02-05 15:11:36 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-02-05 15:11:36 +0000 |
commit | 0100288b269129035bc14e78661db2d7fbad45de (patch) | |
tree | db4ba5f2775ce87863861ea09289557bf7d38f90 /usr.sbin/btrace | |
parent | d09b641350e25487a032edd1451a5e9093aa02de (diff) |
Print statistics on stderr to be able to redirect bt(5) script output.
From Christian Ludwig.
Diffstat (limited to 'usr.sbin/btrace')
-rw-r--r-- | usr.sbin/btrace/btrace.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <mpi@openbsd.org> @@ -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); } } |