diff options
author | K. Y. Srinivasan | 2011-07-22 19:14:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-08-24 01:19:36 +0200 |
commit | e54bbc6471d7f788d829e5f3b5922960048fbff7 (patch) | |
tree | 750667ec2d7572b1c767c8d2f6d655f012493ac9 /drivers/staging/hv/tools/hv_kvp_daemon.c | |
parent | Staging: hv: vmbus: Fix checkpatch warnings (diff) | |
download | kernel-qcow2-linux-e54bbc6471d7f788d829e5f3b5922960048fbff7.tar.gz kernel-qcow2-linux-e54bbc6471d7f788d829e5f3b5922960048fbff7.tar.xz kernel-qcow2-linux-e54bbc6471d7f788d829e5f3b5922960048fbff7.zip |
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>
Diffstat (limited to 'drivers/staging/hv/tools/hv_kvp_daemon.c')
-rw-r--r-- | drivers/staging/hv/tools/hv_kvp_daemon.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/hv/tools/hv_kvp_daemon.c b/drivers/staging/hv/tools/hv_kvp_daemon.c index 8fd0f2ba57b4..c4cf988ad5cb 100644 --- a/drivers/staging/hv/tools/hv_kvp_daemon.c +++ b/drivers/staging/hv/tools/hv_kvp_daemon.c @@ -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; |