]> git.proxmox.com Git - qemu.git/commitdiff
device tree: give dt more size
authorAlexander Graf <agraf@suse.de>
Sat, 23 Jul 2011 08:54:11 +0000 (10:54 +0200)
committerAlexander Graf <agraf@suse.de>
Thu, 6 Oct 2011 07:48:01 +0000 (09:48 +0200)
We currently load a device tree blob and then just take its size x2 to
account for modifications we do inside. While this is nice and great,
it fails when we have a small device tree as blob and lots of nodes added
in machine init code.

So for now, just make it 20k bigger than it was before. We maybe want to
be more clever about this later.

Signed-off-by: Alexander Graf <agraf@suse.de>
device_tree.c

index 751538ec1d066170070ecd521f1eeae0c72c5c27..dc69232f10da4be242a97f13d1d0e6422dc12c6e 100644 (file)
@@ -41,6 +41,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
     }
 
     /* Expand to 2x size to give enough room for manipulation.  */
+    dt_size += 10000;
     dt_size *= 2;
     /* First allocate space in qemu for device tree */
     fdt = g_malloc0(dt_size);