On 02/07/2012 04:43 AM, Prerna Saxena wrote: > From: Prerna Saxena <prerna@xxxxxxxxxxxxxxxxxx> > 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@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list