#include "config.h"
#include "qemu-common.h"
-#include "sysemu.h"
#include "device_tree.h"
+#include "hw/loader.h"
#include <libfdt.h>
{
int dt_size;
int dt_file_load_size;
- int new_dt_size;
int ret;
void *fdt = NULL;
/* Expand to 2x size to give enough room for manipulation. */
dt_size *= 2;
/* First allocate space in qemu for device tree */
- fdt = qemu_mallocz(dt_size);
+ fdt = g_malloc0(dt_size);
dt_file_load_size = load_image(filename_path, fdt);
if (dt_file_load_size < 0) {
return fdt;
fail:
- qemu_free(fdt);
+ g_free(fdt);
return NULL;
}
int qemu_devtree_setprop(void *fdt, const char *node_path,
- const char *property, uint32_t *val_array, int size)
+ const char *property, void *val_array, int size)
{
int offset;