From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33048 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzcvP-0001M6-SZ for qemu-devel@nongnu.org; Tue, 15 Mar 2011 18:41:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzcvO-0002tK-EI for qemu-devel@nongnu.org; Tue, 15 Mar 2011 18:41:11 -0400 Received: from adelie.canonical.com ([91.189.90.139]:51055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzcvO-0002tC-7z for qemu-devel@nongnu.org; Tue, 15 Mar 2011 18:41:10 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PzcvM-000634-AU for ; Tue, 15 Mar 2011 22:41:08 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 17D402E889D for ; Tue, 15 Mar 2011 22:41:08 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 15 Mar 2011 22:34:16 -0000 From: Serge Hallyn <584143@bugs.launchpad.net> Sender: bounces@canonical.com References: <20100522092104.29268.17427.malonedeb@soybean.canonical.com> Message-Id: <20110315223417.30552.46313.launchpad@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 584143] Re: qemu fails to set hdd serial number Reply-To: Bug 584143 <584143@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Tags added: verification-needed -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/584143 Title: qemu fails to set hdd serial number Status in QEMU: Fix Released Status in =E2=80=9Cqemu-kvm=E2=80=9D package in Ubuntu: Fix Released Status in =E2=80=9Cqemu-kvm=E2=80=9D source package in Lucid: In Progress Status in =E2=80=9Cqemu-kvm=E2=80=9D source package in Maverick: In Progress Status in =E2=80=9Cqemu-kvm=E2=80=9D package in Debian: Unknown Bug description: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D SRU Justification: 1. Impact: 'qemu -drive ...,serial=3Dxyz' does not work 2. How addressed: a patch from upstream fixes bug that sizeof was called = on the wrong thing. 3. patch: is in the description 4. to reproduce: use '-drive ...,serial=3Dxyz' option to qemu 5. regression potential: this only changes one line which called sizeof = on the wrong thing, so should not impact any other code. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The -drive ...,serial=3Dxyz option is broken, at least in 0.12. See Debian bug#573439, http://bugs.debian.org/cgi- bin/bugreport.cgi?bug=3D573439 for details. The proposed fix from the original reporter: --- 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 @@ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dinfo->on_write_error =3D on_write_error; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dinfo->opts =3D opts; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (serial) - strncpy(dinfo->serial, serial, sizeof(serial)); + strncpy(dinfo->serial, serial, sizeof(dinfo->serial)); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0QTAILQ_INSERT_TAIL(&drives, dinfo, next); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (is_extboot) { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0extboot_drive =3D d= info;