summaryrefslogtreecommitdiff
path: root/sys/dev/dt/dt_dev.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2024-08-21 09:27:38 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2024-08-21 09:27:38 +0000
commit315052d27b011c392adce5486bbda9735a57da3e (patch)
treebe61482e9d73f84a35a5c97fe96d97feabe912bf /sys/dev/dt/dt_dev.c
parentfb15e13c057d848dceaa6e10556e5fd6406c76d7 (diff)
Read events from all PCBs as long as there's no error.
From Christian Ludwig.
Diffstat (limited to 'sys/dev/dt/dt_dev.c')
-rw-r--r--sys/dev/dt/dt_dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/dt/dt_dev.c b/sys/dev/dt/dt_dev.c
index 99ce128b9f4..98b11fff6f0 100644
--- a/sys/dev/dt/dt_dev.c
+++ b/sys/dev/dt/dt_dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dt_dev.c,v 1.34 2024/08/18 08:23:58 mpi Exp $ */
+/* $OpenBSD: dt_dev.c,v 1.35 2024/08/21 09:27:37 mpi Exp $ */
/*
* Copyright (c) 2019 Martin Pieuchot <mpi@openbsd.org>
@@ -239,7 +239,7 @@ dtread(dev_t dev, struct uio *uio, int flags)
TAILQ_FOREACH(dp, &sc->ds_pcbs, dp_snext) {
count = 0;
error = dt_pcb_ring_copy(dp, uio, max, &count, &dropped);
- if (error || count == 0)
+ if (error && count == 0)
break;
read += count;