Re: [virt-manager PATCH] Generate valid UUIDs according to RFC4122

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/04/2013 06:32 PM, Cole Robinson wrote:
> On 06/01/2013 03:51 AM, Martin Kletzander wrote:
>> Similar change to that made in libvrt's upstream commit 396c4d34.
>>
>> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=963161
>> ---
>>  virtinst/util.py | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/virtinst/util.py b/virtinst/util.py
>> index 0781600..2529ba6 100644
>> --- a/virtinst/util.py
>> +++ b/virtinst/util.py
>> @@ -1,5 +1,5 @@
>>  #
>> -# Copyright 2006  Red Hat, Inc.
>> +# Copyright 2006, 2013  Red Hat, Inc.
>>  # Jeremy Katz <katzj@xxxxxxxxxx>
>>  #
>>  # This program is free software; you can redistribute it and/or modify
>> @@ -514,6 +514,8 @@ def randomUUID(conn):
>>          return "00000000-1111-2222-3333-444444444444"
>>
>>      u = [random.randint(0, 255) for ignore in range(0, 16)]
>> +    u[7] = (u[7] & 0x0F) | (4 << 4)
>> +    u[9] = (u[9] & 0x3F) | (2 << 6)
>>      return "-".join(["%02x" * 4, "%02x" * 2, "%02x" * 2, "%02x" * 2,
>>                       "%02x" * 6]) % tuple(u)
>>
> 
> ACK, please push.
> 

Done, thanks.

Martin

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux