Instead of duplicating class lookup and strstart() code for each VGA interface type, use a table to implement select_vgahw().
Changes v1 -> v2: * Keep assert(vga_interface_type == VGA_NONE) line Suggested-by: Eric Blake <ebl...@redhat.com> * Fix spacing on select_vgahw() definition Suggested-by: Eric Blake <ebl...@redhat.com> * Include "vl: Use exit(1) when requested VGA interface is unavailable" in the series, also Eduardo Habkost (3): vl: Use exit(1) when requested VGA interface is unavailable vl: Table-based select_vgahw() vl: Replace *_vga_available() functions with class_names field include/sysemu/sysemu.h | 1 + vl.c | 157 ++++++++++++++++++++++-------------------------- 2 files changed, 73 insertions(+), 85 deletions(-) -- 2.1.0