From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Lagar-Cavilla Subject: [PATCH 06/14]: libxenlight, set domain handle Date: Mon, 30 Nov 2009 14:13:08 -0500 Message-ID: <4B141944.5030202@lagarcavilla.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080404000400020500010609" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080404000400020500010609 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------080404000400020500010609 Content-Type: text/x-patch; name="06_set_domain_handle_uuid.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="06_set_domain_handle_uuid.patch" # HG changeset patch # User Andres Lagar-Cavilla # 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 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) { --------------080404000400020500010609 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080404000400020500010609--