svn commit: r301948 - stable/10/sys/dev/hyperv/utilities

Sepherosa Ziehau sephe at FreeBSD.org
Thu Jun 16 03:25:27 UTC 2016


Author: sephe
Date: Thu Jun 16 03:25:26 2016
New Revision: 301948
URL: https://svnweb.freebsd.org/changeset/base/301948

Log:
  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

Modified:
  stable/10/sys/dev/hyperv/utilities/hv_heartbeat.c
  stable/10/sys/dev/hyperv/utilities/hv_kvp.c
  stable/10/sys/dev/hyperv/utilities/hv_shutdown.c
  stable/10/sys/dev/hyperv/utilities/hv_timesync.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hyperv/utilities/hv_heartbeat.c
==============================================================================
--- stable/10/sys/dev/hyperv/utilities/hv_heartbeat.c	Thu Jun 16 03:16:43 2016	(r301947)
+++ stable/10/sys/dev/hyperv/utilities/hv_heartbeat.c	Thu Jun 16 03:25:26 2016	(r301948)
@@ -94,6 +94,10 @@ static int
 hv_heartbeat_probe(device_t dev)
 {
 	const char *p = vmbus_get_type(dev);
+
+	if (resource_disabled("hvheartbeat", 0))
+		return ENXIO;
+
 	if (!memcmp(p, &service_guid, sizeof(hv_guid))) {
 		device_set_desc(dev, "Hyper-V Heartbeat Service");
 		return BUS_PROBE_DEFAULT;

Modified: stable/10/sys/dev/hyperv/utilities/hv_kvp.c
==============================================================================
--- stable/10/sys/dev/hyperv/utilities/hv_kvp.c	Thu Jun 16 03:16:43 2016	(r301947)
+++ stable/10/sys/dev/hyperv/utilities/hv_kvp.c	Thu Jun 16 03:25:26 2016	(r301948)
@@ -863,6 +863,10 @@ static int
 hv_kvp_probe(device_t dev)
 {
 	const char *p = vmbus_get_type(dev);
+
+	if (resource_disabled("hvkvp", 0))
+		return ENXIO;
+
 	if (!memcmp(p, &service_guid, sizeof(hv_guid))) {
 		device_set_desc(dev, "Hyper-V KVP Service");
 		return BUS_PROBE_DEFAULT;

Modified: stable/10/sys/dev/hyperv/utilities/hv_shutdown.c
==============================================================================
--- stable/10/sys/dev/hyperv/utilities/hv_shutdown.c	Thu Jun 16 03:16:43 2016	(r301947)
+++ stable/10/sys/dev/hyperv/utilities/hv_shutdown.c	Thu Jun 16 03:25:26 2016	(r301948)
@@ -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;

Modified: stable/10/sys/dev/hyperv/utilities/hv_timesync.c
==============================================================================
--- stable/10/sys/dev/hyperv/utilities/hv_timesync.c	Thu Jun 16 03:16:43 2016	(r301947)
+++ stable/10/sys/dev/hyperv/utilities/hv_timesync.c	Thu Jun 16 03:25:26 2016	(r301948)
@@ -171,6 +171,10 @@ static int
 hv_timesync_probe(device_t dev)
 {
 	const char *p = vmbus_get_type(dev);
+
+	if (resource_disabled("hvtimesync", 0))
+		return ENXIO;
+
 	if (!memcmp(p, &service_guid, sizeof(hv_guid))) {
 		device_set_desc(dev, "Hyper-V Time Synch Service");
 		return BUS_PROBE_DEFAULT;


More information about the svn-src-stable mailing list