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-changelog

[Xen-changelog] Changed UUID / Xen handle formatting to be compatible wi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Changed UUID / Xen handle formatting to be compatible with the OSF DCE UUIDs.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Dec 2005 19:30:07 +0000
Delivery-date: Tue, 20 Dec 2005 19:32:54 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 11cd619db03540476cef8ec523d46d9a1d13973c
# Parent  b62e324574d2acba81a4e61c9b55e4e7c8918920
Changed UUID / Xen handle formatting to be compatible with the OSF DCE UUIDs.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r b62e324574d2 -r 11cd619db035 tools/python/xen/xend/uuid.py
--- a/tools/python/xen/xend/uuid.py     Thu Dec 15 18:38:49 2005
+++ b/tools/python/xen/xend/uuid.py     Tue Dec 20 17:16:15 2005
@@ -17,8 +17,13 @@
 #============================================================================
 
 
-"""Universal(ly) Unique Identifiers (UUIDs).
-"""
+"""Universal Unique Identifiers (UUIDs).  By default, UUIDs generated here are
+purely random, with no internal structure.  However, they are the same size,
+and are formatted by the same conventions, as the UUIDs in the Open Software
+Foundation's Distributed Computing Environment (OSF DCE).  This allows Xend to
+be used with UUIDs generated as per the DCE specification, should that be
+required.  These UUIDs are also, by no coincidence, the same size as the
+'handle' stored by the Xen hypervisor along with the domain structure."""
 
 
 import commands
@@ -54,7 +59,8 @@
 
 
 def toString(u):
-    return "-".join(["%02x" * 4] * 4) % tuple(u)
+    return "-".join(["%02x" * 4, "%02x" * 2, "%02x" * 2, "%02x" * 2,
+                     "%02x" * 6]) % tuple(u)
 
 def fromString(s):
     s = s.replace('-', '')
diff -r b62e324574d2 -r 11cd619db035 xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Thu Dec 15 18:38:49 2005
+++ b/xen/common/keyhandler.c   Tue Dec 20 17:16:15 2005
@@ -112,8 +112,11 @@
         printk("Xen: DOM %u, flags=%lx refcnt=%d nr_pages=%d "
                "xenheap_pages=%d\n", d->domain_id, d->domain_flags,
                atomic_read(&d->refcnt), d->tot_pages, d->xenheap_pages);
-        printk("     handle=%02x%02x%02x%02x-%02x%02x%02x%02x-"
-               "%02x%02x%02x%02x-%02x%02x%02x%02x\n",
+        /* The handle is printed according to the OSF DCE UUID spec., even
+           though it is not necessarily such a thing, for ease of use when it
+           _is_ one of those. */
+        printk("     handle=%02x%02x%02x%02x-%02x%02x-%02x%02x-"
+               "%02x%02x-%02x%02x%02x%02x%02x%02x\n",
                d->handle[ 0], d->handle[ 1], d->handle[ 2], d->handle[ 3],
                d->handle[ 4], d->handle[ 5], d->handle[ 6], d->handle[ 7],
                d->handle[ 8], d->handle[ 9], d->handle[10], d->handle[11],

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Changed UUID / Xen handle formatting to be compatible with the OSF DCE UUIDs., Xen patchbot -unstable <=