]> Git Repo - qemu.git/commit - vl.c
blockdev: Convert drive_new() to Error
authorMarkus Armbruster <[email protected]>
Wed, 17 Oct 2018 08:26:57 +0000 (10:26 +0200)
committerMarkus Armbruster <[email protected]>
Fri, 19 Oct 2018 12:51:34 +0000 (14:51 +0200)
commitc4f26c9f37ce511e5fe629c21c180dc6eb7c5a25
tree71f9b8ec1ca23f70733ce1aae570e51179cda9c7
parentf881ca19f1942965490a70d23566c6287c49ceac
blockdev: Convert drive_new() to Error

Calling error_report() from within a function that takes an Error **
argument is suspicious.  drive_new() calls error_report() even though
it can run within drive_init_func(), which takes an Error ** argument.
drive_init_func()'s caller main(), via qemu_opts_foreach(), is fine
with it, but clean it up anyway:

* Convert drive_new() to Error

* Update add_init_drive() to report the error received from
  drive_new()

* Make main() pass &error_fatal through qemu_opts_foreach(),
  drive_init_func() to drive_new()

* Make default_drive() pass &error_abort through qemu_opts_foreach(),
  drive_init_func() to drive_new()

Cc: Kevin Wolf <[email protected]>
Cc: Max Reitz <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20181017082702[email protected]>
blockdev.c
device-hotplug.c
include/sysemu/blockdev.h
vl.c
This page took 0.024161 seconds and 4 git commands to generate.