Commit e6a6dfe454c6b43abf9d5df8170950c4a9f28920
1 parent
704aec58
Fix serial option with -drive
This is from the KVM tree. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
1 additions
and
1 deletions
vl.c
... | ... | @@ -2537,7 +2537,7 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque) |
2537 | 2537 | drives_table[drives_table_idx].unit = unit_id; |
2538 | 2538 | drives_table[drives_table_idx].onerror = onerror; |
2539 | 2539 | drives_table[drives_table_idx].drive_opt_idx = arg - drives_opt; |
2540 | - strncpy(drives_table[nb_drives].serial, serial, sizeof(serial)); | |
2540 | + strncpy(drives_table[drives_table_idx].serial, serial, sizeof(serial)); | |
2541 | 2541 | nb_drives++; |
2542 | 2542 | |
2543 | 2543 | switch(type) { | ... | ... |