[Libvir] [PATCH] Core code contains Xen-ism UUID of dom0 = 0000-0000-0000-0000

Richard W.M. Jones rjones at redhat.com
Wed Apr 9 11:52:24 UTC 2008


This patch removes a Xen-ism from the core code.  The Xen driver sets
the UUID to all-zeroes so we don't need a hack in virDomainGetUUID.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
-------------- next part --------------
Index: src/libvirt.c
===================================================================
RCS file: /data/cvs/libvirt/src/libvirt.c,v
retrieving revision 1.134
diff -u -p -r1.134 libvirt.c
--- src/libvirt.c	4 Apr 2008 15:09:19 -0000	1.134
+++ src/libvirt.c	9 Apr 2008 11:54:01 -0000
@@ -1794,11 +1794,8 @@ virDomainGetUUID(virDomainPtr domain, un
         return (-1);
     }
 
-    if (domain->id == 0) {
-        memset(uuid, 0, VIR_UUID_BUFLEN);
-    } else {
-        memcpy(uuid, &domain->uuid[0], VIR_UUID_BUFLEN);
-    }
+    memcpy(uuid, &domain->uuid[0], VIR_UUID_BUFLEN);
+
     return (0);
 }
 


More information about the libvir-list mailing list