]> Git Repo - qemu.git/blobdiff - hw/pc_sysfw.c
use an uint64_t for the max_sz parameter in load_image_targphys
[qemu.git] / hw / pc_sysfw.c
index abf9004182305ca441c501dba6cbc58e630ab9c5..f0d7c21b5cceafeb8e4850cacf259bf8e2b50b9a 100644 (file)
@@ -85,6 +85,9 @@ static void pc_fw_add_pflash_drv(void)
     filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
 
     opts = drive_add(IF_PFLASH, -1, filename, "readonly=on");
+
+    g_free(filename);
+
     if (opts == NULL) {
       return;
     }
@@ -190,6 +193,8 @@ void pc_system_firmware_init(MemoryRegion *rom_memory)
 
     sysfw_dev = (PcSysFwDevice*) qdev_create(NULL, "pc-sysfw");
 
+    qdev_init_nofail(DEVICE(sysfw_dev));
+
     if (sysfw_dev->rom_only) {
         old_pc_system_rom_init(rom_memory);
         return;
@@ -230,11 +235,17 @@ static Property pcsysfw_properties[] = {
     DEFINE_PROP_END_OF_LIST(),
 };
 
+static int pcsysfw_init(DeviceState *dev)
+{
+    return 0;
+}
+
 static void pcsysfw_class_init (ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS (klass);
 
     dc->desc = "PC System Firmware";
+    dc->init = pcsysfw_init;
     dc->props = pcsysfw_properties;
 }
 
This page took 0.025958 seconds and 4 git commands to generate.