From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9zoM-0002pP-G5 for qemu-devel@nongnu.org; Sun, 02 Feb 2014 11:23:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9zmt-0000Ol-Es for qemu-devel@nongnu.org; Sun, 02 Feb 2014 11:22:22 -0500 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:48760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9zms-0000OU-ON for qemu-devel@nongnu.org; Sun, 02 Feb 2014 11:20:51 -0500 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Feb 2014 02:20:42 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 50E7A3578053 for ; Mon, 3 Feb 2014 03:20:40 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s12G1DZR11862456 for ; Mon, 3 Feb 2014 03:01:14 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s12GKcD3008914 for ; Mon, 3 Feb 2014 03:20:39 +1100 From: "Aneesh Kumar K.V" In-Reply-To: <1390921707-15109-1-git-send-email-kirill.shutemov@linux.intel.com> References: <1390921707-15109-1-git-send-email-kirill.shutemov@linux.intel.com> Date: Sun, 02 Feb 2014 21:50:27 +0530 Message-ID: <87mwi94hbo.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 1/4] hw/9pfs: fix error handing in local_ioc_getversion() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Kirill A. Shutemov" , qemu-devel@nongnu.org, aliguori@amazon.com, mst@redhat.com Cc: armbru@redhat.com "Kirill A. Shutemov" writes: > v9fs_co_st_gen() expects to see error code in errno, not in return code. > > Let's fix this. > > Signed-off-by: Kirill A. Shutemov Reviewed-by: Aneesh Kumar K.V > --- > hw/9pfs/virtio-9p-local.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c > index fc93e9e6e8da..9be8854e9148 100644 > --- a/hw/9pfs/virtio-9p-local.c > +++ b/hw/9pfs/virtio-9p-local.c > @@ -1068,8 +1068,8 @@ err_out: > static int local_ioc_getversion(FsContext *ctx, V9fsPath *path, > mode_t st_mode, uint64_t *st_gen) > { > - int err; > #ifdef FS_IOC_GETVERSION > + int err; > V9fsFidOpenState fid_open; > > /* > @@ -1085,10 +1085,11 @@ static int local_ioc_getversion(FsContext *ctx, V9fsPath *path, > } > err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen); > local_close(ctx, &fid_open); > + return err; > #else > - err = -ENOTTY; > + errno = ENOTTY; > + return -1; > #endif > - return err; > } > > static int local_init(FsContext *ctx) > -- > 1.8.5.2