diff options
author | sephe <sephe@FreeBSD.org> | 2016-06-16 03:25:26 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2016-06-16 03:25:26 +0000 |
commit | cb4c1de089409ef1b9276cbfd62237dc2a30d2ff (patch) | |
tree | a1dce504c6c267b95fa7aa910b207d1325c34ef4 /sys/dev/hyperv/utilities/hv_shutdown.c | |
parent | 6a585fbdca889986b227564e0f049e4e88f46c7c (diff) | |
download | FreeBSD-src-cb4c1de089409ef1b9276cbfd62237dc2a30d2ff.zip FreeBSD-src-cb4c1de089409ef1b9276cbfd62237dc2a30d2ff.tar.gz |
MFC 297220
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.c | 4 |
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; |