From: Markus Armbruster Date: Fri, 13 Mar 2015 12:08:36 +0000 (+0100) Subject: vl: Fail right after first bad -object X-Git-Tag: v2.4.0-rc0~92^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8122928a52248e28513c79d9b9929c6d20c866ea;p=thirdparty%2Fqemu.git vl: Fail right after first bad -object Failure to create an object with -object is a fatal error. However, we delay the actual exit until all -object are processed. On the one hand, this permits detection of genuine additional errors. On the other hand, it can muddy the waters with uninteresting additional errors, e.g. when a later -object tries to reference a prior one that failed. We generally stop right on the first bad option, so do that for -object as well. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- diff --git a/vl.c b/vl.c index 680f4d82a55..c9c3f33ce76 100644 --- a/vl.c +++ b/vl.c @@ -4055,7 +4055,7 @@ int main(int argc, char **argv, char **envp) } if (qemu_opts_foreach(qemu_find_opts("object"), - object_create, NULL, 0) != 0) { + object_create, NULL, 1) != 0) { exit(1); }