From 233e01e475f3bead95180d715e9b25bd4e76017a Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Fri, 1 May 2009 09:26:16 -0500 Subject: [PATCH] Fix serial option with -drive This is from the KVM tree. Signed-off-by: Anthony Liguori --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 54ae45bf941..62af5387dae 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) { -- 2.39.5