From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53904 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIzTq-0006Ey-Kk for qemu-devel@nongnu.org; Mon, 31 May 2010 03:32:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIzTp-00006u-MJ for qemu-devel@nongnu.org; Mon, 31 May 2010 03:32:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5902) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIzTp-00006T-Ey for qemu-devel@nongnu.org; Mon, 31 May 2010 03:32:13 -0400 Message-ID: <4C0365F8.2070703@redhat.com> Date: Mon, 31 May 2010 09:32:08 +0200 From: Jes Sorensen MIME-Version: 1.0 References: <4BFFE03F.40606@redhat.com> <20100528154402.GB3604@redhat.com> In-Reply-To: <20100528154402.GB3604@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [SeaBIOS] SMBIOS strings List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: seabios@seabios.org, QEMU Developers On 05/28/10 17:44, Gleb Natapov wrote: > On Fri, May 28, 2010 at 05:24:47PM +0200, Jes Sorensen wrote: >> I guess the Socket Designation in particular might have been done for a >> reason? >> > It was part of commit cf2affa6de. And was a result of moving to > snprintf() instead of direct string manipulation. Before that > string was created like that: > memcpy((char *)start, "CPU " "\0" "" "\0" "", 7); > ((char *)start)[4] = cpu_number + '0'; > Which start to produce strange cpu numbers for cpus greater then 9. I > doubt we want to go back to that ;) Hi Gleb, I see. Well I guess we could do something slightly more compatible by printing along the lines: printf("CPU:"); if (nr < 10) printf(" "); snprintf() Not sure if it is worth it, but it should be doable without reverting to memcpy(). Thoughts? Cheers, Jes