On 08/04/2014 11:56 PM, Hu Tao wrote:
> These two are almost the same as memory_region_init_ram() and
> memory_region_init_ram_ptr() except that they have an extra errp
> parameter to let callers handle error. The purpose is to fix the bug
> described below.
> 
> We should have added errp directly to memory_region_ram(), but that
> mixes updates to calls to memory_region_ram() and this bug fix and make
> it hard to review.
> 
> We will rename _may_fail variants later so that we will have two versions
> of API: one with errp parameter(memory_region_init_ram(),
> memory_region_init_ram_ptr()), one without errp parameter and with
> suffix _nofail.

That feels like overkill.  Every caller that calls the _nofail variant
can instead call memory_region_init_ram(..., &error_abort), and then you
don't need the _nofail version.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to