Skip to contentSkip to conversation

Staging: hv: util: kvp: Fix the reported OSVersion string

PATCH New K. Y. Srinivasan 1 participant 1 message Jul 22, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: hv: util: kvp: Fix the reported OSVersion string

The current win7 host does not like it when we return the complete kernel release information. Conform to what the host expects.

---
 drivers/staging/hv/tools/hv_kvp_daemon.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/staging/hv/tools/hv_kvp_daemon.c +9 -0
index c230bae..6f3e5c2 100644
@@ -119,6 +119,15 @@ void kvp_get_os_info(void)
 	os_build = uts_buf.release;
 	processor_arch = uts_buf.machine;
 
+	/*
+	 * The current windows host (win7) expects the build
+	 * string to be of the form: x.y.z
+	 * Strip additional information we may have.
+	 */
+	p = strchr(os_build, '-');
+	if (p)
+		*p = '\0';
+
 	file = fopen("/etc/SuSE-release", "r");
 	if (file != NULL)
 		goto kvp_osinfo_found;
Signature · 1 line
1.7.4.1