From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpkP1-0001e6-Js for qemu-devel@nongnu.org; Thu, 11 Mar 2010 10:34:23 -0500 Received: from [199.232.76.173] (port=39028 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpkP1-0001dK-47 for qemu-devel@nongnu.org; Thu, 11 Mar 2010 10:34:23 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NpkOz-0003iE-NA for qemu-devel@nongnu.org; Thu, 11 Mar 2010 10:34:22 -0500 Received: from isrv.corpit.ru ([81.13.33.159]:53065) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NpkOz-0003hy-Ab for qemu-devel@nongnu.org; Thu, 11 Mar 2010 10:34:21 -0500 Message-ID: <4B990D78.6050708@msgid.tls.msk.ru> Date: Thu, 11 Mar 2010 18:34:16 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <20100311.234200.145758949990685830.kou1.ono@gmail.com> In-Reply-To: <20100311.234200.145758949990685830.kou1.ono@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: Bug#573439: qemu-kvm: fail to set hdd serial number List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kouichi ONO , 573439@bugs.debian.org Cc: qemu-devel tags 573439 + upstream patch pending thanks Kouichi ONO wrote: > Package: qemu-kvm > Version: 0.12.3+dfsg-3 > Severity: normal > > Hello, > > On version 0.12.3, -drive serial=XXX option does not work. > Below patch fixes it. 'serial' is pointer, not array. > > > --- qemu-kvm-0.12.3+dfsg/vl.c 2010-02-26 11:34:00.000000000 +0900 > +++ qemu-kvm-0.12.3+dfsg.old/vl.c 2010-03-11 02:26:00.134217787 +0900 > @@ -2397,7 +2397,7 @@ > dinfo->on_write_error = on_write_error; > dinfo->opts = opts; > if (serial) > - strncpy(dinfo->serial, serial, sizeof(serial)); > + strncpy(dinfo->serial, serial, sizeof(dinfo->serial)); > QTAILQ_INSERT_TAIL(&drives, dinfo, next); > if (is_extboot) { > extboot_drive = dinfo; Good catch! Thank you for the excellent bug report with the patch. It is this way even in upstream qemu, not only in qemu-kvm... So forwarding this to upstream too. The patch will in in the next release of the Debian package. Thanks! /mjt