summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrange <grange@openbsd.org>2004-09-15 18:58:59 +0000
committergrange <grange@openbsd.org>2004-09-15 18:58:59 +0000
commitd6be678225fa4b50fd0f9bd7aaf1c57ba5b8aa1b (patch)
tree415a73d1346574593ac8b24d2929a75406f418dc
parentSupport for -Dvar=value in pkg_create: (diff)
downloadwireguard-openbsd-d6be678225fa4b50fd0f9bd7aaf1c57ba5b8aa1b.tar.xz
wireguard-openbsd-d6be678225fa4b50fd0f9bd7aaf1c57ba5b8aa1b.zip
Return the ability to queue events before hotplugd started.
ok deraadt@
-rw-r--r--sys/dev/hotplug.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/hotplug.c b/sys/dev/hotplug.c
index 131541f302c..73e45f87116 100644
--- a/sys/dev/hotplug.c
+++ b/sys/dev/hotplug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hotplug.c,v 1.4 2004/07/30 05:36:32 miod Exp $ */
+/* $OpenBSD: hotplug.c,v 1.5 2004/09/15 18:58:59 grange Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -84,10 +84,7 @@ hotplug_device_detach(enum devclass class, char *name)
int
hotplug_put_event(struct hotplug_event *he)
{
- if (opened == 0)
- return (0);
-
- if (evqueue_count == HOTPLUG_MAXEVENTS) {
+ if (evqueue_count == HOTPLUG_MAXEVENTS && opened) {
printf("hotplug: event lost, queue full\n");
return (1);
}