From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUYhI-0002oa-TG for qemu-devel@nongnu.org; Fri, 11 Oct 2013 05:07:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUYhC-000828-Mi for qemu-devel@nongnu.org; Fri, 11 Oct 2013 05:07:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUYhC-00081R-FZ for qemu-devel@nongnu.org; Fri, 11 Oct 2013 05:07:42 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9B97fZ4024007 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Oct 2013 05:07:41 -0400 Date: Fri, 11 Oct 2013 11:07:40 +0200 From: Kevin Wolf Message-ID: <20131011090740.GA3112@dhcp-200-207.str.redhat.com> References: <1381412644-16212-1-git-send-email-mreitz@redhat.com> <1381412644-16212-3-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1381412644-16212-3-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/5] block/raw-posix: Employ error parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Am 10.10.2013 um 15:44 hat Max Reitz geschrieben: > Make use of the error parameter in the opening and creating functions in > block/raw-posix.c. > > Signed-off-by: Max Reitz > --- > block/raw-posix.c | 60 ++++++++++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 48 insertions(+), 12 deletions(-) You forgot updating a raw_open_common() caller which is compiled out on your system. Builds will fail on FreeBSD now. > @@ -1059,12 +1069,15 @@ static int raw_create(const char *filename, QEMUOptionParameter *options, > fd = qemu_open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, > 0644); > if (fd < 0) { > + error_setg_errno(errp, errno, "Could not create file"); > result = -errno; Doesn't error_setg_errno() change the value of errno? (More instances follow.) Kevin