From: Pino Toscano Date: Mon, 12 Oct 2020 11:33:45 +0000 (+0200) Subject: vmx: expand the disk array X-Git-Tag: v6.9.0-rc1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18a1dd57cd32493ce1124f2f1400811ccc9815b7;p=thirdparty%2Flibvirt.git vmx: expand the disk array Account for the possible SATA disks too, which means 120 potential disks. This means the size of the array triples, however that is unavoidable with the current way of reading disks. Signed-off-by: Pino Toscano Reviewed-by: Michal Privoznik --- diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 0ec6222f50..6e4b455794 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -1645,8 +1645,8 @@ virVMXParseConfig(virVMXContext *ctx, if (def->graphics[def->ngraphics] != NULL) ++def->ngraphics; - /* def:disks: 4 * 15 scsi + 2 * 2 ide + 2 floppy = 66 */ - def->disks = g_new0(virDomainDiskDefPtr, 66); + /* def:disks: 4 * 15 scsi + 4 * 30 sata + 2 * 2 ide + 2 floppy = 186 */ + def->disks = g_new0(virDomainDiskDefPtr, 186); def->ndisks = 0; /* def:disks (scsi) */