WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] xenfs: implement O_NONBLOCK for /proc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xenfs: implement O_NONBLOCK for /proc/xen/xenbus
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Jul 2010 02:45:09 -0700
Delivery-date: Mon, 26 Jul 2010 02:45:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1280137200 -3600
# Node ID 2893229a53a0a3aa6663d96e7c877e43936a3c8e
# Parent  85ca9742b8b9f49d8371c6ce305b0cdeff4f341e
xenfs: implement O_NONBLOCK for /proc/xen/xenbus

This patch implements O_NONBLOCK for /proc/xen/xenbus.  It is a simple
matter of returning -EAGAIN instead of waiting on a queue.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 drivers/xen/xenbus/xenbus_dev.c |    3 +++
 1 files changed, 3 insertions(+)

diff -r 85ca9742b8b9 -r 2893229a53a0 drivers/xen/xenbus/xenbus_dev.c
--- a/drivers/xen/xenbus/xenbus_dev.c   Fri Jul 09 12:37:28 2010 +0100
+++ b/drivers/xen/xenbus/xenbus_dev.c   Mon Jul 26 10:40:00 2010 +0100
@@ -104,6 +104,9 @@ static ssize_t xenbus_dev_read(struct fi
        mutex_lock(&u->reply_mutex);
        while (list_empty(&u->read_buffers)) {
                mutex_unlock(&u->reply_mutex);
+               if (filp->f_flags & O_NONBLOCK)
+                       return -EAGAIN;
+
                ret = wait_event_interruptible(u->read_waitq,
                                               !list_empty(&u->read_buffers));
                if (ret)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xenfs: implement O_NONBLOCK for /proc/xen/xenbus, Xen patchbot-linux-2.6.18-xen <=