On Tue, Jun 24, 2014 at 01:01:52PM +0200, Markus Armbruster wrote:
> Kevin Wolf <kw...@redhat.com> writes:
> 
> > Am 23.06.2014 um 17:28 hat Chen Gang geschrieben:
> >> When failure occurs, 'ret' need be set, or may return 0 to indicate 
> >> success.
> >> And error_propagate() also need be called only one time within a function.
> >> 
> >> It is abnormal to prevent bdrv_append_temp_snapshot() return value but 
> >> still
> >> set errp when error occurs -- although it contents return value internally.
> >> 
> >> So let bdrv_append_temp_snapshot() internal return value outside, and let
> >> all things normal, then fix the issue too.
> >> 
> >> Signed-off-by: Chen Gang <gang.chen.5...@gmail.com>
> >
> > What does this fix?
> 
> It fixes the return value of bdrv_open() when
> bdrv_append_temp_snapshot() fails.  Before this patch, it returns a
> positive value, which is wrong.  After the patch, it returns the
> negative error code bdrv_append_temp_snapshot() now returns.

Exactly.  I asked for the -errno return because otherwise bdrv_open()
would have no accurate errno.

Stefan

Attachment: pgptPuBNgjD6J.pgp
Description: PGP signature

Reply via email to