[libvirt] ESX [05/12]: Also strip (C) and (TM) from the CPU model string
Daniel Veillard
veillard at redhat.com
Mon Sep 14 12:23:03 UTC 2009
On Mon, Sep 14, 2009 at 02:42:35AM +0200, Matthias Bolte wrote:
> * src/esx/esx_driver.c: also strip (C) and (TM) from the CPU model string
> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
> index 3f3ee30..96d5976 100644
> --- a/src/esx/esx_driver.c
> +++ b/src/esx/esx_driver.c
> @@ -746,9 +746,12 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
> if (STRPREFIX (ptr, " ")) {
> memmove(ptr, ptr + 1, strlen (ptr + 1) + 1);
> continue;
> - } else if (STRPREFIX (ptr, "(R)")) {
> + } else if (STRPREFIX(ptr, "(R)") || STRPREFIX(ptr, "(C)")) {
> memmove(ptr, ptr + 3, strlen (ptr + 3) + 1);
> continue;
> + } else if (STRPREFIX(ptr, "(TM)")) {
> + memmove(ptr, ptr + 4, strlen(ptr + 4) + 1);
> + continue;
> }
>
> ++ptr;
Okay, I think it's better to have this sooner than later, first it's
a cleanup and it's also somehow an interface, if people start to use
those values it's better for them to have the cleaned up set, and I
don't see any risk.
So pushed to git too, thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list