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

[Xen-changelog] build privcmd even in unpriv domains; minor libxc fix



ChangeSet 1.1439, 2005/05/05 15:27:20+01:00, smh22@xxxxxxxxxxxxxxxxxxxx

        build privcmd even in unpriv domains; minor libxc fix
        
        Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx> 



 linux-2.6.11-xen-sparse/drivers/xen/Makefile |    2 +-
 tools/libxc/xc_domain.c                      |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/Makefile 
b/linux-2.6.11-xen-sparse/drivers/xen/Makefile
--- a/linux-2.6.11-xen-sparse/drivers/xen/Makefile      2005-05-05 14:04:35 
-04:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/Makefile      2005-05-05 14:04:35 
-04:00
@@ -3,8 +3,8 @@
 obj-y  += console/
 obj-y  += evtchn/
 obj-y  += balloon/
+obj-y  += privcmd/
 
-obj-$(CONFIG_XEN_PRIVILEGED_GUEST)     += privcmd/
 obj-$(CONFIG_XEN_BLKDEV_BACKEND)       += blkback/
 obj-$(CONFIG_XEN_NETDEV_BACKEND)       += netback/
 obj-$(CONFIG_XEN_BLKDEV_FRONTEND)      += blkfront/
diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   2005-05-05 14:04:35 -04:00
+++ b/tools/libxc/xc_domain.c   2005-05-05 14:04:35 -04:00
@@ -103,6 +103,7 @@
     unsigned int nr_doms;
     u32 next_domid = first_domid;
     dom0_op_t op;
+    int rc = 0; 
 
     for ( nr_doms = 0; nr_doms < max_doms; nr_doms++ )
     {
@@ -110,7 +111,7 @@
         op.u.getdomaininfo.domain = (domid_t)next_domid;
         op.u.getdomaininfo.exec_domain = 0; // FIX ME?!?
         op.u.getdomaininfo.ctxt = NULL; /* no exec context info, thanks. */
-        if ( do_dom0_op(xc_handle, &op) < 0 )
+        if ( (rc = do_dom0_op(xc_handle, &op)) < 0 )
             break;
         info->domid   = (u16)op.u.getdomaininfo.domain;
 
@@ -136,6 +137,8 @@
         next_domid = (u16)op.u.getdomaininfo.domain + 1;
         info++;
     }
+
+    if(!nr_doms) return rc; 
 
     return nr_doms;
 }

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


 


Rackspace

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