aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-05-01 09:26:16 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-05-01 10:13:17 -0500
commit233e01e475f3bead95180d715e9b25bd4e76017a (patch)
tree865e663d7b49f08b902b75bc406094d81034bfd0
parent544995e22e1c78f7190cf984d21292e8df0bce55 (diff)
Fix serial option with -drive
This is from the KVM tree. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--vl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 54ae45bf94..62af5387da 100644
--- 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) {