Only use pseudo-random generator for uuid if using /dev/random fails.
* src/util/uuid.c: The original code. would only print the warning
message if using /dev/random failed, but would still go ahead and call
virUUIDGeneratePseudoRandomBytes in all cases anyway.
VIR_WARN(_("Falling back to pseudorandom UUID,"
" failed to generate random bytes: %s"),
virStrerror(err, ebuf, sizeof ebuf));
+ err = virUUIDGeneratePseudoRandomBytes(uuid, VIR_UUID_BUFLEN);
}
- return virUUIDGeneratePseudoRandomBytes(uuid, VIR_UUID_BUFLEN);
+ return(err);
}
/* Convert C from hexadecimal character to integer. */