Commit 8122928a authored by Markus Armbruster's avatar Markus Armbruster
Browse files

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: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
parent 8416abb3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
    }