[parted-devel] generate_random_id() fix

H. Peter Anvin hpa at zytor.com
Wed Jul 11 21:14:35 UTC 2007


Jim Meyering wrote:
> "H. Peter Anvin" <hpa at zytor.com> wrote:
> ...
>> I would avoid using the UUID, since the UUID is not guaranteed to be
>> random in any way -- in fact, even for a "random" UUID there are at
>> least 6 bits which are fixed.
>>
>> I don't know exactly what uuid_generate() does, so it's hard to say
>> exactly if this is a problem or not.  At the very least I would XOR the
>> different words of the UUID together.
> 
> Oh!  Good point.
> Knowing that, I prefer your code.
> Just want to use it from both places.
> Do you feel like doing that?

I can do it, although it might make more sense to move this to a
separate file, and that means digging more into how you have the source
code set up.

	-hpa



More information about the parted-devel mailing list