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

[Xen-devel] [PATCH 06/14]: libxenlight, set domain handle



Set domain handle much like xend does, identical to
the uuid. This allows obtaining the uuid of a domain
from the handle in the dominfo struct.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1259601195 18000
# Node ID 0b8510293912d2f33481e3529aec12193b5b40d2
# Parent  7e246208b1bfc0d3c11a5ea90eb40b6a19273170
Set domain handle much like xend does, identical to 
the uuid. This allows obtaining the uuid of a domain 
from the handle in the dominfo struct.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

diff -r 7e246208b1bf -r 0b8510293912 libxl.c
--- a/libxl.c
+++ b/libxl.c
@@ -101,7 +101,7 @@ int libxl_domain_make(struct libxl_ctx *
     flags |= info->hap ? XEN_DOMCTL_CDF_hap : 0;
     *domid = 0;
 
-    /* XXX handle has to be initialised here.
+    /*
      * info->uuid != xen_domain_handle_t
      * See: 
      *      http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt
@@ -118,6 +118,8 @@ int libxl_domain_make(struct libxl_ctx *
      *     uint8_t         node[_UUID_NODE_LEN];
      * };
      */
+    /* Ultimately, handle is an array of 16 uint8_t, same as uuid */
+    memcpy(handle, info->uuid, sizeof(xen_domain_handle_t));
 
     ret = xc_domain_create(ctx->xch, info->ssidref, handle, flags, domid);
     if (ret < 0) {
_______________________________________________
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®.