[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.