1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

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 <ptoscano@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Pino Toscano 2020-10-12 13:33:45 +02:00
parent 11e61489ff
commit 18a1dd57cd

View File

@ -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) */