From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEM9f-0002UL-C9 for qemu-devel@nongnu.org; Fri, 14 Feb 2014 12:02:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEM9X-0003bE-01 for qemu-devel@nongnu.org; Fri, 14 Feb 2014 12:02:23 -0500 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:40094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEM9W-0003b4-SN for qemu-devel@nongnu.org; Fri, 14 Feb 2014 12:02:14 -0500 Received: by mail-qc0-f179.google.com with SMTP id e16so20764571qcx.10 for ; Fri, 14 Feb 2014 09:02:14 -0800 (PST) Sender: Paolo Bonzini Message-ID: <52FE4C12.8050607@redhat.com> Date: Fri, 14 Feb 2014 18:02:10 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1392138233-26407-1-git-send-email-pbonzini@redhat.com> <1392138233-26407-10-git-send-email-pbonzini@redhat.com> <20140214164540.GK32343@dhcp-200-207.str.redhat.com> In-Reply-To: <20140214164540.GK32343@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 09/20] cow: correctly propagate errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: famz@redhat.com, qemu-devel@nongnu.org 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