WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 06/14]: libxenlight, set domain handle
From: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Date: Mon, 30 Nov 2009 14:13:08 -0500
Cc:
Delivery-date: Mon, 30 Nov 2009 11:14:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (X11/20090817)
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 06/14]: libxenlight, set domain handle, Andres Lagar-Cavilla <=