[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/9] vl: Fail right after first bad -object
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 3/9] vl: Fail right after first bad -object |
Date: |
Mon, 8 Jun 2015 20:02:11 +0200 |
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 <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
vl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index 680f4d8..c9c3f33 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);
}
--
1.9.3
- [Qemu-devel] [PULL 0/9] Error reporting patches, Markus Armbruster, 2015/06/08
- [Qemu-devel] [PULL 2/9] vl: Print -device help at most once, Markus Armbruster, 2015/06/08
- [Qemu-devel] [PULL 1/9] vl: Report failure to sandbox at most once, Markus Armbruster, 2015/06/08
- [Qemu-devel] [PULL 9/9] vhost-user: Improve -netdev/netdev_add/-net/... error reporting, Markus Armbruster, 2015/06/08
- [Qemu-devel] [PULL 7/9] QemuOpts: Drop qemu_opt_foreach() parameter abort_on_failure, Markus Armbruster, 2015/06/08
- [Qemu-devel] [PULL 3/9] vl: Fail right after first bad -object,
Markus Armbruster <=
- [Qemu-devel] [PULL 5/9] QemuOpts: Convert qemu_opts_foreach() to Error, Markus Armbruster, 2015/06/08
- [Qemu-devel] [PULL 8/9] QemuOpts: Convert qemu_opt_foreach() to Error, Markus Armbruster, 2015/06/08
- [Qemu-devel] [PULL 4/9] QemuOpts: Drop qemu_opts_foreach() parameter abort_on_failure, Markus Armbruster, 2015/06/08
- [Qemu-devel] [PULL 6/9] blkdebug: Simplify passing of Error through qemu_opts_foreach(), Markus Armbruster, 2015/06/08
- Re: [Qemu-devel] [PULL 0/9] Error reporting patches, Peter Maydell, 2015/06/08