mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
dec317fd6a
commit
e54bbc6471
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue