summaryrefslogtreecommitdiff
path: root/hw/fw_cfg.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-05-21 16:54:00 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-05-21 20:54:40 -0500
commitec80831772c1e75e65a80a65e9464c9a86c41396 (patch)
treeb0babc07fa0cd9a00c8b072618f7492434884746 /hw/fw_cfg.c
parent77c2a5ca84174d16be9e95d9f7ec5b1c57eff956 (diff)
downloadqemu-ec80831772c1e75e65a80a65e9464c9a86c41396.tar.gz
qemu-ec80831772c1e75e65a80a65e9464c9a86c41396.tar.bz2
qemu-ec80831772c1e75e65a80a65e9464c9a86c41396.zip
Refactor how display drivers are selected
My previous commit, f92f8afebe, broke -vnc (spotted by Glauber Costa). This is because it's necessary to tell when the no special display parameters have been passed and default to SDL or VNC appropriately. This refactors the display selection logic to be less complicated which has the effect of fixing the regression mentioned above. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/fw_cfg.c')
-rw-r--r--hw/fw_cfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c
index 39bd955905..e605cda663 100644
--- a/hw/fw_cfg.c
+++ b/hw/fw_cfg.c
@@ -277,7 +277,7 @@ void *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
}
fw_cfg_add_bytes(s, FW_CFG_SIGNATURE, (uint8_t *)"QEMU", 4);
fw_cfg_add_bytes(s, FW_CFG_UUID, qemu_uuid, 16);
- fw_cfg_add_i16(s, FW_CFG_NOGRAPHIC, (uint16_t)nographic);
+ fw_cfg_add_i16(s, FW_CFG_NOGRAPHIC, (uint16_t)(display_type == DT_NOGRAPHIC));
fw_cfg_add_i16(s, FW_CFG_NB_CPUS, (uint16_t)smp_cpus);
register_savevm("fw_cfg", -1, 1, fw_cfg_save, fw_cfg_load, s);