From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDZmr-0002RJ-9I for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:42:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDZmi-0001Mf-Hj for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:42:17 -0400 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:36654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDZmh-0001Lk-TK for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:42:08 -0400 Received: from /spool/local by au.ibm.com with XMail ESMTP for from ; Tue, 11 Oct 2011 10:40:46 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9BAfuNS2568304 for ; Tue, 11 Oct 2011 21:41:56 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9BAftD9022741 for ; Tue, 11 Oct 2011 21:41:56 +1100 From: "Aneesh Kumar K.V" Date: Tue, 11 Oct 2011 16:11:37 +0530 Message-Id: <1318329705-3179-6-git-send-email-aneesh.kumar@linux.vnet.ibm.com> In-Reply-To: <1318329705-3179-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1318329705-3179-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH -V2 05/13] virtio-9p: Use 9P specific Lock constants List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, "M. Mohan Kumar" , "Aneesh Kumar K.V" From: "M. Mohan Kumar" Use 9P specific lock constants instead of arch specific lock constants. Signed-off-by: M. Mohan Kumar Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p.c | 2 +- hw/9pfs/virtio-9p.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index 3958788..d476485 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -2930,7 +2930,7 @@ static void v9fs_getlock(void *opaque) if (err < 0) { goto out; } - glock->type = F_UNLCK; + glock->type = P9_LOCK_TYPE_UNLCK; offset += pdu_marshal(pdu, offset, "bqqds", glock->type, glock->start, glock->length, glock->proc_id, &glock->client_id); diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h index 60b8a56..e5cf78c 100644 --- a/hw/9pfs/virtio-9p.h +++ b/hw/9pfs/virtio-9p.h @@ -352,6 +352,11 @@ typedef struct V9fsMkState { V9fsString fullname; } V9fsMkState; +/* 9P2000.L lock type */ +#define P9_LOCK_TYPE_RDLCK 0 +#define P9_LOCK_TYPE_WRLCK 1 +#define P9_LOCK_TYPE_UNLCK 2 + #define P9_LOCK_SUCCESS 0 #define P9_LOCK_BLOCKED 1 #define P9_LOCK_ERROR 2 -- 1.7.5.4