Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e54bbc64 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

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.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent dec317fd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -118,6 +118,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;