summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv/utilities/hv_shutdown.c
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-03-24 01:12:28 +0000
committersephe <sephe@FreeBSD.org>2016-03-24 01:12:28 +0000
commit5b08863f1f700850af80483dbc2adaac78b021b3 (patch)
tree4662edf7c257dd039776380b65109b512b75ecb1 /sys/dev/hyperv/utilities/hv_shutdown.c
parentc939ef2e215069b4fe694e5cdaf44045ae31b30a (diff)
downloadFreeBSD-src-5b08863f1f700850af80483dbc2adaac78b021b3.zip
FreeBSD-src-5b08863f1f700850af80483dbc2adaac78b021b3.tar.gz
hyperv/utils: Allow hint to disable individual utility
Reviewed by: kib, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5714
Diffstat (limited to 'sys/dev/hyperv/utilities/hv_shutdown.c')
-rw-r--r--sys/dev/hyperv/utilities/hv_shutdown.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/hyperv/utilities/hv_shutdown.c b/sys/dev/hyperv/utilities/hv_shutdown.c
index 20bc65e..0beed5a 100644
--- a/sys/dev/hyperv/utilities/hv_shutdown.c
+++ b/sys/dev/hyperv/utilities/hv_shutdown.c
@@ -116,6 +116,10 @@ static int
hv_shutdown_probe(device_t dev)
{
const char *p = vmbus_get_type(dev);
+
+ if (resource_disabled("hvshutdown", 0))
+ return ENXIO;
+
if (!memcmp(p, &service_guid, sizeof(hv_guid))) {
device_set_desc(dev, "Hyper-V Shutdown Service");
return BUS_PROBE_DEFAULT;
OpenPOWER on IntegriCloud