|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v2 09/20] cow: correctly propagate errors |
Date: | Fri, 14 Feb 2014 18:02:10 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Il 14/02/2014 17:45, Kevin Wolf ha scritto:
> - ret = bdrv_file_open(&cow_bs, filename, NULL, NULL, BDRV_O_RDWR, > - &local_err); > + ret = bdrv_file_open(&cow_bs, filename, NULL, NULL, BDRV_O_RDWR, errp); > if (ret < 0) { > - qerror_report_err(local_err); > - error_free(local_err); > return ret; > }This is technically correct, but I think general policy is that using the local_err pattern is preferred anyway.
I think only for void-returning functions. I checked callers of monitor_get_fd and they use this pattern, even if they pass &local_err instead of errp.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |