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-devel

[Xen-devel] [PATCH] check for access type in xs.c

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] check for access type in xs.c
From: NAHieu <nahieu@xxxxxxxxx>
Date: Fri, 9 Sep 2005 01:50:03 +0900
Delivery-date: Thu, 08 Sep 2005 16:47:56 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=XUpmN70K7hDtdBByaciRFqv7rEebIeUJWg7qGjgh/F/CUxNHvCC+pVLP3MIyXqcVA4WLyMCa+0JJCMvX5Zvhe/1uXcEkSBic5cjKA6J2mYm9Pv3JTJctGeiZlZsFu/pWqM6wnvcPg4/MNNZYK7dt8ueuFKByOPhJvHyPLNRqaPo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Some library functions in xs.c don't support /proc/xen/xenbus
interface (yet). Here is the patch to fix the problem.



diff -r c2705e74efba tools/xenstore/xs.c
--- a/tools/xenstore/xs.c       Thu Sep  8 15:22:01 2005
+++ b/tools/xenstore/xs.c       Fri Sep  9 01:48:38 2005
@@ -508,6 +508,9 @@
        struct xsd_sockmsg msg;
        char **ret;
 
+       if (h->type == DEV)
+               return NULL; /* support only with socket interface */ 
+
        if (!read_all(h->fd, &msg, sizeof(msg)))
                return NULL;
 
@@ -624,6 +627,8 @@
 
 bool xs_shutdown(struct xs_handle *h)
 {
+       if (h->type == DEV)
+               return false; /* support only with socket interface */ 
        bool ret = xs_bool(xs_single(h, XS_SHUTDOWN, "", NULL));
        if (ret) {
                char c;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] check for access type in xs.c, NAHieu <=