From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUaTh-0005Fn-Mo for qemu-devel@nongnu.org; Fri, 11 Oct 2013 07:01:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUaTb-0001RI-Lg for qemu-devel@nongnu.org; Fri, 11 Oct 2013 07:01:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUaTb-0001R9-Dg for qemu-devel@nongnu.org; Fri, 11 Oct 2013 07:01:47 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9BB1kvX025358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Oct 2013 07:01:46 -0400 From: Markus Armbruster References: <1381412644-16212-1-git-send-email-mreitz@redhat.com> <1381412644-16212-3-git-send-email-mreitz@redhat.com> <20131011090740.GA3112@dhcp-200-207.str.redhat.com> Date: Fri, 11 Oct 2013 13:01:43 +0200 In-Reply-To: <20131011090740.GA3112@dhcp-200-207.str.redhat.com> (Kevin Wolf's message of "Fri, 11 Oct 2013 11:07:40 +0200") Message-ID: <87iox4hy08.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Kevin Wolf Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz Kevin Wolf writes: > 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.) It does. Easy enough to avoid if it turns out to be inconvenient.