[libvirt] [PATCH] Bug fix: Allow sysinfo to display processor information

Eric Blake eblake at redhat.com
Tue Feb 7 21:48:12 UTC 2012


On 02/07/2012 04:43 AM, Prerna Saxena wrote:
> From: Prerna Saxena <prerna at linux.vnet.ibm.com>
> Date: Tue, 7 Feb 2012 17:05:37 +0530
> Subject: [PATCH] On systems with dmidecode version 2.10 or older,
>  dmidecode displays processor information, followed by BIOS, system and
>  memory-DIMM details.
>  Calls to virSysinfoParseBIOS(), virSysinfoParseSystem() would update
>  the buffer pointer 'base', so the processor information would be lost
>  before virSysinfoParseProcessor() was called. Sysinfo would therefore
>  not be able to display processor details -- It only described <bios>,
>  <system> and <memory_device> details.
>  This patch attempts to insulate sysinfo from ordering of dmidecode
>  output.
> 

I was thinking of going one step further - since we no longer care about
the result, there's no longer a need to return a char *, and we can
instead return an int (0 for success, -1 for failure).  But that can be
a separate cleanup; your patch is a minimal fix for the bug at hand, so
ACK and pushed.

> -    base = outbuf;
> -
> -    if ((base = virSysinfoParseBIOS(base, ret)) == NULL)
> +    if ((virSysinfoParseBIOS(outbuf, ret)) == NULL)
>          goto no_memory;

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120207/5e719f40/attachment-0001.sig>


More information about the libvir-list mailing list