• M
    spapr: Fix return value of vga initialization · 7effdaa3
    Mark Wu 提交于
    Before spapr_vga_init will returned false if the vga is specified by
    the command '-device VGA' because vga_interface_type was evaluated to
    VGA_NONE. With the change in previous patch of this series,
    spapr_vga_init should return true if it's told that the vga will be
    initialized in flow of the generic devices initialization.
    
    To keep '-nodefaults' have the semantics of bare minimum, it adds a
    check of 'has_defaults' in usb_enabled() to avoid that a USB controller
    is added by '-nodefautls, -device VGA' implicitly.
    
    This patch also makes two cleanups:
    1. skip initialization for VGA_NONE
    2. remove the useless 'break'
    Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: NMark Wu <wudxw@linux.vnet.ibm.com>
    Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: NAndreas Färber <afaerber@suse.de>
    7effdaa3
vl.c 125.6 KB