Re: [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows

2014-12-17 Thread zhanghailiang
On 2014/12/17 0:25, Eric Blake wrote: On 12/16/2014 12:30 AM, zhanghailiang wrote: Hi, This patch series add a new guest command 'guest-get-os-version'. It is now only available for windows guest. Why not also supply it for Linux guests? uname() is your friend; it should be fairly easy to

Re: [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows

2014-12-16 Thread Yan Vugenfirer
Hi, My suggestion is to handle the case when the newer OS will be installed in the guest as well. Please look at version helper API - http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspx

Re: [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows

2014-12-16 Thread zhanghailiang
On 2014/12/16 17:38, Yan Vugenfirer wrote: Hi, My suggestion is to handle the case when the newer OS will be installed in the guest as well. Yes, we can do this when we install guest OS, save the version info into some places, and get the info when we need, But it is not so flexible,

Re: [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows

2014-12-16 Thread Eric Blake
On 12/16/2014 12:30 AM, zhanghailiang wrote: Hi, This patch series add a new guest command 'guest-get-os-version'. It is now only available for windows guest. Why not also supply it for Linux guests? uname() is your friend; it should be fairly easy to wire up. It will return guest's OS

[Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows

2014-12-15 Thread zhanghailiang
Hi, This patch series add a new guest command 'guest-get-os-version'. It is now only available for windows guest. It will return guest's OS version name and type, like bellow: '{return:{name:Microsoft Windows Server 2012 R2,type:64}}' Sometimes we need to know guest's OS version info.