summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2004-09-15 18:59:00 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2004-09-15 18:59:00 +0000
commit1fecb659a2782f397a1cffe2ab1dd46faa9ad3a6 (patch)
treeb8bc3b5f2af14f85587fac8cb782839fc0b1ce90
parent9ce6db25c60cbbb9f2ace3611886466c4e638875 (diff)
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);
}