* [Qemu-devel] [PATCH] vl: Use exit(1) when requested VGA interface is unavailable
@ 2015-11-11 20:39 Eduardo Habkost
2015-11-11 21:01 ` Eric Blake
0 siblings, 1 reply; 2+ messages in thread
From: Eduardo Habkost @ 2015-11-11 20:39 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini
Instead of using exit(0), use exit(1) when an unavailable VGA
interface is used in the command-line to indicate it's an error.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
vl.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/vl.c b/vl.c
index 7d993a5..7b81998 100644
--- a/vl.c
+++ b/vl.c
@@ -2011,28 +2011,28 @@ static void select_vgahw (const char *p)
vga_interface_type = VGA_STD;
} else {
error_report("standard VGA not available");
- exit(0);
+ exit(1);
}
} else if (strstart(p, "cirrus", &opts)) {
if (cirrus_vga_available()) {
vga_interface_type = VGA_CIRRUS;
} else {
error_report("Cirrus VGA not available");
- exit(0);
+ exit(1);
}
} else if (strstart(p, "vmware", &opts)) {
if (vmware_vga_available()) {
vga_interface_type = VGA_VMWARE;
} else {
error_report("VMWare SVGA not available");
- exit(0);
+ exit(1);
}
} else if (strstart(p, "virtio", &opts)) {
if (virtio_vga_available()) {
vga_interface_type = VGA_VIRTIO;
} else {
error_report("Virtio VGA not available");
- exit(0);
+ exit(1);
}
} else if (strstart(p, "xenfb", &opts)) {
vga_interface_type = VGA_XENFB;
@@ -2041,21 +2041,21 @@ static void select_vgahw (const char *p)
vga_interface_type = VGA_QXL;
} else {
error_report("QXL VGA not available");
- exit(0);
+ exit(1);
}
} else if (strstart(p, "tcx", &opts)) {
if (tcx_vga_available()) {
vga_interface_type = VGA_TCX;
} else {
error_report("TCX framebuffer not available");
- exit(0);
+ exit(1);
}
} else if (strstart(p, "cg3", &opts)) {
if (cg3_vga_available()) {
vga_interface_type = VGA_CG3;
} else {
error_report("CG3 framebuffer not available");
- exit(0);
+ exit(1);
}
} else if (!strstart(p, "none", &opts)) {
invalid_vga:
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-11 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-11 20:39 [Qemu-devel] [PATCH] vl: Use exit(1) when requested VGA interface is unavailable Eduardo Habkost
2015-11-11 21:01 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).