summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Knudsen <mk@cvs.openbsd.org>2006-05-28 01:33:51 +0000
committerMichael Knudsen <mk@cvs.openbsd.org>2006-05-28 01:33:51 +0000
commitc2a515d420306ea8e24621710865c86c172efa40 (patch)
treebeb8007ae363f16ce7c78ef57fc345a38bccf6ac /sys/dev
parent558df10eb9ad635023ca959cde1a13cafde9959f (diff)
Include device id in hotplug events. This will be used by ntpd to check
sensors on attach/detach. hotplugd changes following in a minute. ok henning.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/hotplug.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/hotplug.c b/sys/dev/hotplug.c
index b463370010e..e41aa87f1f2 100644
--- a/sys/dev/hotplug.c
+++ b/sys/dev/hotplug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hotplug.c,v 1.6 2004/10/08 18:57:38 drahn Exp $ */
+/* $OpenBSD: hotplug.c,v 1.7 2006/05/28 01:33:50 mk Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -60,10 +60,11 @@ hotplugattach(int count)
}
void
-hotplug_device_attach(enum devclass class, char *name)
+hotplug_device_attach(enum devclass class, char *name, int id)
{
struct hotplug_event he;
+ he.he_devid = id;
he.he_type = HOTPLUG_DEVAT;
he.he_devclass = class;
strlcpy(he.he_devname, name, sizeof(he.he_devname));
@@ -71,10 +72,11 @@ hotplug_device_attach(enum devclass class, char *name)
}
void
-hotplug_device_detach(enum devclass class, char *name)
+hotplug_device_detach(enum devclass class, char *name, int id)
{
struct hotplug_event he;
+ he.he_devid = id;
he.he_type = HOTPLUG_DEVDT;
he.he_devclass = class;
strlcpy(he.he_devname, name, sizeof(he.he_devname));