[parted-devel] generate_random_id() fix
H. Peter Anvin
hpa at zytor.com
Wed Jul 11 18:39:48 UTC 2007
The existing generate_random_id() in libparted only produces numbers in
the range 0..999999, less than 20 bits. This patch tries to get a
random number from /dev/urandom if available, and otherwise produces a
32-bit value from gettimeofday().
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: random-id.diff
Type: text/x-patch
Size: 970 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20070711/b43af01b/attachment.bin
More information about the parted-devel
mailing list