Re: [Libvir] [patch 1/3] Add UUID generation to qemud

2007-02-26 Thread Richard W.M. Jones
Mark McLoughlin wrote: +static int +qemudGenerateRandomBytes(unsigned char *buf, + int buflen) +{ +int fd; + +if ((fd = open("/dev/urandom", O_RDONLY)) < 0) +return errno; + +while (buflen > 0) { +int n; + +if ((n = read(fd, buf, buflen

[Libvir] [patch 1/3] Add UUID generation to qemud

2007-02-26 Thread Mark McLoughlin
If a guest or network does not have a UUID assigned to it, we generate a random UUID preferably using /dev/urandom, but falling back to pseudo-random number generation if that fails. Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]> Index: libvirt/qemud/Makefile.am ==