]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Fix serial option with -drive
authorAnthony Liguori <aliguori@us.ibm.com>
Fri, 1 May 2009 14:26:16 +0000 (09:26 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 1 May 2009 15:13:17 +0000 (10:13 -0500)
This is from the KVM tree.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c

diff --git a/vl.c b/vl.c
index 54ae45bf941008023898d93ebd4fc56730e6ce8e..62af5387dae02e37c3c9bf94afc1fd574f83580f 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2566,7 +2566,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) {