qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 30/31] blockdev: Convert drive_new() to Error


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 30/31] blockdev: Convert drive_new() to Error
Date: Mon, 8 Oct 2018 15:48:10 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 10/8/18 12:31 PM, Markus Armbruster wrote:
Calling error_report() from within a a function that takes an Error **

s/a a/a/

argument is suspicious.  drive_new() does that, and its caller
drive_init_func() then exit()s.  Its 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 <address@hidden>
Cc: Max Reitz <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
  blockdev.c                | 27 ++++++++++++++-------------
  device-hotplug.c          |  5 ++++-
  include/sysemu/blockdev.h |  3 ++-
  vl.c                      | 11 ++++-------
  4 files changed, 24 insertions(+), 22 deletions(-)


Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]