Received: from [140.186.70.92] (port=37813 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzUam-0002lD-7Z for qemu-devel@nongnu.org; Tue, 15 Mar 2011 09:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzUal-0004yp-3c for qemu-devel@nongnu.org; Tue, 15 Mar 2011 09:47:20 -0400 Received: from adelie.canonical.com ([91.189.90.139]:37795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzUak-0004ya-T1 for qemu-devel@nongnu.org; Tue, 15 Mar 2011 09:47:19 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PzUaj-0001xr-MI for ; Tue, 15 Mar 2011 13:47:17 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 724E82E80F1 for ; Tue, 15 Mar 2011 13:47:17 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 15 Mar 2011 13:37:50 -0000 From: Serge Hallyn <584143@bugs.launchpad.net> Sender: bounces@canonical.com References: <20100522092104.29268.17427.malonedeb@soybean.canonical.com> Message-Id: <20110315133752.25587.51120.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 ** Description changed: + =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 @@ - dinfo->on_write_error =3D on_write_error; - dinfo->opts =3D opts; - if (serial) + =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)); - QTAILQ_INSERT_TAIL(&drives, dinfo, next); - if (is_extboot) { - extboot_drive =3D dinfo; + =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; -- = 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;