summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2004-07-30 05:36:32 +0000
committermiod <miod@openbsd.org>2004-07-30 05:36:32 +0000
commitb6a3a3dd39aad071406665226c924967b4e0854b (patch)
tree59e56e4033005fe25907dc92bf9950fe0f1d137c
parentA true gem. (diff)
downloadwireguard-openbsd-b6a3a3dd39aad071406665226c924967b4e0854b.tar.xz
wireguard-openbsd-b6a3a3dd39aad071406665226c924967b4e0854b.zip
Correctly drain event queue on close. Fixes PR #3874
-rw-r--r--sys/dev/hotplug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/hotplug.c b/sys/dev/hotplug.c
index f11c83b84c2..131541f302c 100644
--- a/sys/dev/hotplug.c
+++ b/sys/dev/hotplug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hotplug.c,v 1.3 2004/07/05 19:40:38 deraadt Exp $ */
+/* $OpenBSD: hotplug.c,v 1.4 2004/07/30 05:36:32 miod Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -135,7 +135,7 @@ hotplugclose(dev_t dev, int flag, int mode, struct proc *p)
{
struct hotplug_event he;
- while (hotplug_get_event(&he) == 1)
+ while (hotplug_get_event(&he) == 0)
;
opened = 0;
return (0);