Patchwork [Bug,584143] Re: qemu fails to set hdd serial number

login
register
mail settings
Submitter Aurelien Jarno
Date Jan. 1, 2011, 2:34 p.m.
Message ID <20110101143438.20128.68308.launchpad@soybean.canonical.com>
Download mbox | patch
Permalink /patch/77142/
State New
Headers show

Comments

Aurelien Jarno - Jan. 1, 2011, 2:34 p.m.
** Changed in: qemu
       Status: In Progress => Fix Committed

Patch

--- 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;