Markus Armbruster
d319e05d6f
pc: Fix machine property nvdimm-persistence error handling
Calling error_report() in a function that takes an Error ** argument
is suspicious. pc.c's pc_machine_set_nvdimm_persistence() does that,
and then exit()s. Wrong. Attempting to set machine property
nvdimm-persistence to a bad value instantly kills the VM:
$ qemu-system-x86_64 -nodefaults -S -display none -qmp stdio
{"QMP": {"version": {"qemu": {"micro": 50, "minor": 0, "major": 3}, "package": "v3.0.0-837-gc5e4e49258"}, "capabilities": []}}
{"execute": "qmp_capabilities"}
{"return": {}}
{"execute": "qom-set", "arguments": {"path": "/machine", "property": "nvdimm-persistence", "value": "instadeath"}}
-machine nvdimm-persistence=instadeath: unsupported option
$ echo $?
1
Broken when commit 11c39b5cd96 (v3.0.0) replaced error_propagate();
return by error_report(); exit() instead of error_setg(); return. Fix
that.
Fixes: 11c39b5cd966ddc067a1ca0c5392ec9b666c45b7
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20181017082702.5581-10-armbru@redhat.com>
2018-10-19 14:51:34 +02:00
..
2018-10-02 19:09:13 +02:00
2018-07-02 15:41:13 +02:00
2018-09-07 17:05:18 -04:00
2018-06-15 15:23:34 +01:00
2018-06-26 21:58:03 +03:00
2018-01-18 21:52:38 +02:00
2018-08-27 15:09:20 +02:00
2018-06-01 14:15:10 +02:00
2018-03-12 16:12:46 +01:00
2018-09-24 17:13:07 +02:00
2018-07-02 15:41:16 +02:00
2018-07-02 15:41:16 +02:00
2018-07-02 15:41:16 +02:00
2018-10-19 14:51:34 +02:00
2018-08-27 15:09:20 +02:00
2018-03-12 16:12:48 +01:00
2018-03-12 16:12:48 +01:00
2018-01-18 21:52:38 +02:00