Commit 28b85ed8db996e06c7f371d6034b7cd3876f9012
1 parent
9306acb5
simplify vga selection (Gerd Hoffmann)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7227 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
11 deletions
vl.c
... | ... | @@ -4222,23 +4222,16 @@ static void select_vgahw (const char *p) |
4222 | 4222 | { |
4223 | 4223 | const char *opts; |
4224 | 4224 | |
4225 | + cirrus_vga_enabled = 0; | |
4226 | + std_vga_enabled = 0; | |
4227 | + vmsvga_enabled = 0; | |
4225 | 4228 | if (strstart(p, "std", &opts)) { |
4226 | 4229 | std_vga_enabled = 1; |
4227 | - cirrus_vga_enabled = 0; | |
4228 | - vmsvga_enabled = 0; | |
4229 | 4230 | } else if (strstart(p, "cirrus", &opts)) { |
4230 | 4231 | cirrus_vga_enabled = 1; |
4231 | - std_vga_enabled = 0; | |
4232 | - vmsvga_enabled = 0; | |
4233 | 4232 | } else if (strstart(p, "vmware", &opts)) { |
4234 | - cirrus_vga_enabled = 0; | |
4235 | - std_vga_enabled = 0; | |
4236 | 4233 | vmsvga_enabled = 1; |
4237 | - } else if (strstart(p, "none", &opts)) { | |
4238 | - cirrus_vga_enabled = 0; | |
4239 | - std_vga_enabled = 0; | |
4240 | - vmsvga_enabled = 0; | |
4241 | - } else { | |
4234 | + } else if (!strstart(p, "none", &opts)) { | |
4242 | 4235 | invalid_vga: |
4243 | 4236 | fprintf(stderr, "Unknown vga type: %s\n", p); |
4244 | 4237 | exit(1); | ... | ... |