From: Anthony Liguori Date: Fri, 1 May 2009 14:26:16 +0000 (-0500) Subject: Fix serial option with -drive X-Git-Tag: v0.11.0-rc0~722 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=e6a6dfe454c6b43abf9d5df8170950c4a9f28920;p=qemu.git Fix serial option with -drive This is from the KVM tree. Signed-off-by: Anthony Liguori --- diff --git a/vl.c b/vl.c index 385b124a8..867111c1e 100644 --- a/vl.c +++ b/vl.c @@ -2537,7 +2537,7 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque) drives_table[drives_table_idx].unit = unit_id; drives_table[drives_table_idx].onerror = onerror; drives_table[drives_table_idx].drive_opt_idx = arg - drives_opt; - strncpy(drives_table[nb_drives].serial, serial, sizeof(serial)); + strncpy(drives_table[drives_table_idx].serial, serial, sizeof(serial)); nb_drives++; switch(type) {