summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hw/ppc/spapr.c4
-rw-r--r--vl.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index bf46c380ec..5c9a154d6a 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -781,13 +781,15 @@ static int spapr_vga_init(PCIBus *pci_bus)
 {
     switch (vga_interface_type) {
     case VGA_NONE:
+        return false;
+    case VGA_DEVICE:
+        return true;
     case VGA_STD:
         return pci_vga_init(pci_bus) != NULL;
     default:
         fprintf(stderr, "This vga model is not supported,"
                 "currently it only supports -vga std\n");
         exit(0);
-        break;
     }
 }
 
diff --git a/vl.c b/vl.c
index 98f6460890..842e897d75 100644
--- a/vl.c
+++ b/vl.c
@@ -974,7 +974,8 @@ static void parse_name(QemuOpts *opts)
 
 bool usb_enabled(bool default_usb)
 {
-    return qemu_opt_get_bool(qemu_get_machine_opts(), "usb", default_usb);
+    return qemu_opt_get_bool(qemu_get_machine_opts(), "usb",
+                             has_defaults && default_usb);
 }
 
 #ifndef _WIN32