]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vmx: expand the disk array
authorPino Toscano <ptoscano@redhat.com>
Mon, 12 Oct 2020 11:33:45 +0000 (13:33 +0200)
committerPino Toscano <ptoscano@redhat.com>
Wed, 14 Oct 2020 09:23:27 +0000 (11:23 +0200)
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>
src/vmx/vmx.c

index 0ec6222f50a996454788e31c39e684b330126404..6e4b455794d91de33b4bc0bb5e4e39fb074cfd3d 100644 (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) */