Skip to contentSkip to conversation

: libxenlight, set domain handle

PATCH In review Andres Lagar-Cavilla 1 participant 1 message Nov 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 6/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.

# HG changeset patch
# User Andres Lagar-Cavilla <[email protected]> # 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.

libxl.c +3 -1
diff -r 7e246208b1bf -r 0b8510293912 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
[email protected]
http://lists.xensource.com/xen-devel