diff -r cfa5910f18ba qemud/conf.c --- a/qemud/conf.c Sun Jun 17 22:11:17 2007 -0400 +++ b/qemud/conf.c Sun Jun 17 22:11:26 2007 -0400 @@ -792,12 +792,12 @@ static struct qemud_vm_def *qemudParseXM if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL) || (obj->stringval[0] == 0)) { int err; - if ((err = qemudGenerateUUID(def->uuid))) { + if ((err = virUUIDGenerate(def->uuid))) { qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "Failed to generate UUID: %s", strerror(err)); goto error; } - } else if (qemudParseUUID((const char *)obj->stringval, def->uuid) < 0) { + } else if (virUUIDParse((const char *)obj->stringval, def->uuid) < 0) { qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s", "malformed uuid element"); goto error; } @@ -1905,12 +1905,12 @@ static struct qemud_network_def *qemudPa if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL) || (obj->stringval[0] == 0)) { int err; - if ((err = qemudGenerateUUID(def->uuid))) { + if ((err = virUUIDGenerate(def->uuid))) { qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "Failed to generate UUID: %s", strerror(err)); goto error; } - } else if (qemudParseUUID((const char *)obj->stringval, def->uuid) < 0) { + } else if (virUUIDParse((const char *)obj->stringval, def->uuid) < 0) { qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s", "malformed uuid element"); goto error; } diff -r cfa5910f18ba qemud/uuid.c --- a/qemud/uuid.c Sun Jun 17 22:11:17 2007 -0400 +++ b/qemud/uuid.c Sun Jun 17 22:11:26 2007 -0400 @@ -35,8 +35,8 @@ #include "internal.h" static int -qemudGenerateRandomBytes(unsigned char *buf, - int buflen) +virUUIDGenerateRandomBytes(unsigned char *buf, + int buflen) { int fd; @@ -63,8 +63,8 @@ qemudGenerateRandomBytes(unsigned char * } static int -qemudGeneratePseudoRandomBytes(unsigned char *buf, - int buflen) +virUUIDGeneratePseudoRandomBytes(unsigned char *buf, + int buflen) { srand(time(NULL)); while (buflen > 0) { @@ -76,20 +76,20 @@ qemudGeneratePseudoRandomBytes(unsigned } int -qemudGenerateUUID(unsigned char *uuid) +virUUIDGenerate(unsigned char *uuid) { int err; - if ((err = qemudGenerateRandomBytes(uuid, QEMUD_UUID_RAW_LEN))) + if ((err = virUUIDGenerateRandomBytes(uuid, QEMUD_UUID_RAW_LEN))) qemudLog(QEMUD_WARN, "Falling back to pseudorandom UUID, " "failed to generate random bytes: %s", strerror(err)); - return qemudGeneratePseudoRandomBytes(uuid, QEMUD_UUID_RAW_LEN); + return virUUIDGeneratePseudoRandomBytes(uuid, QEMUD_UUID_RAW_LEN); } int -qemudParseUUID(const char *uuid, unsigned char *rawuuid) { +virUUIDParse(const char *uuid, unsigned char *rawuuid) { const char *cur; int i; diff -r cfa5910f18ba qemud/uuid.h --- a/qemud/uuid.h Sun Jun 17 22:11:17 2007 -0400 +++ b/qemud/uuid.h Sun Jun 17 22:11:26 2007 -0400 @@ -19,12 +19,12 @@ * Mark McLoughlin */ -#ifndef __QEMUD_UUID_H__ -#define __QEMUD_UUID_H__ +#ifndef __VIR_UUID_H__ +#define __VIR_UUID_H__ -int qemudGenerateUUID(unsigned char *uuid); +int virUUIDGenerate(unsigned char *uuid); -int qemudParseUUID (const char *uuid, - unsigned char *rawuuid); +int virUUIDParse(const char *uuid, + unsigned char *rawuuid); -#endif /* __QEMUD_UUID_H__ */ +#endif /* __VIR_UUID_H__ */