mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
vz: cleanup: define vz format of uuids
vz puts uuids into curly braces. Simply introduce new contstant to reflect this and get rid of magic +2 in code. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
0ec30a24b8
commit
2d3940907d
@ -276,7 +276,7 @@ prlsdkConnect(vzDriverPtr driver)
|
||||
PRL_HANDLE job = PRL_INVALID_HANDLE;
|
||||
PRL_HANDLE result = PRL_INVALID_HANDLE;
|
||||
PRL_HANDLE response = PRL_INVALID_HANDLE;
|
||||
char session_uuid[VIR_UUID_STRING_BUFLEN + 2];
|
||||
char session_uuid[VIR_UUID_STRING_BRACED_BUFLEN];
|
||||
|
||||
pret = PrlSrv_Create(&driver->server);
|
||||
prlsdkCheckRetExit(pret, -1);
|
||||
@ -359,7 +359,7 @@ prlsdkUUIDFormat(const unsigned char *uuid, char *uuidstr)
|
||||
static PRL_HANDLE
|
||||
prlsdkSdkDomainLookupByUUID(vzDriverPtr driver, const unsigned char *uuid)
|
||||
{
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN + 2];
|
||||
char uuidstr[VIR_UUID_STRING_BRACED_BUFLEN];
|
||||
PRL_HANDLE sdkdom = PRL_INVALID_HANDLE;
|
||||
|
||||
prlsdkUUIDFormat(uuid, uuidstr);
|
||||
@ -404,7 +404,7 @@ prlsdkGetDomainIds(PRL_HANDLE sdkdom,
|
||||
char **name,
|
||||
unsigned char *uuid)
|
||||
{
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN + 2];
|
||||
char uuidstr[VIR_UUID_STRING_BRACED_BUFLEN];
|
||||
PRL_RESULT pret;
|
||||
|
||||
if (name && !(*name = prlsdkGetStringParamVar(PrlVmCfg_GetName, sdkdom)))
|
||||
@ -1893,7 +1893,7 @@ prlsdkEventsHandler(PRL_HANDLE prlEvent, PRL_VOID_PTR opaque)
|
||||
vzDriverPtr driver = opaque;
|
||||
PRL_RESULT pret = PRL_ERR_FAILURE;
|
||||
PRL_HANDLE_TYPE handleType;
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN + 2];
|
||||
char uuidstr[VIR_UUID_STRING_BRACED_BUFLEN];
|
||||
unsigned char uuid[VIR_UUID_BUFLEN];
|
||||
PRL_EVENT_TYPE prlEventType;
|
||||
|
||||
@ -3572,7 +3572,7 @@ prlsdkDoApplyConfig(vzDriverPtr driver,
|
||||
{
|
||||
PRL_RESULT pret;
|
||||
size_t i;
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN + 2];
|
||||
char uuidstr[VIR_UUID_STRING_BRACED_BUFLEN];
|
||||
char *mask = NULL;
|
||||
|
||||
if (prlsdkCheckUnsupportedParams(sdkdom, def) < 0)
|
||||
@ -4479,7 +4479,7 @@ int prlsdkMigrate(virDomainObjPtr dom, virURIPtr uri,
|
||||
int ret = -1;
|
||||
vzDomObjPtr privdom = dom->privateData;
|
||||
PRL_HANDLE job = PRL_INVALID_HANDLE;
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN + 2];
|
||||
char uuidstr[VIR_UUID_STRING_BRACED_BUFLEN];
|
||||
PRL_UINT32 vzflags = PRLSDK_MIGRATION_FLAGS;
|
||||
|
||||
if (flags & VIR_MIGRATE_PAUSED)
|
||||
|
@ -61,6 +61,9 @@ struct _vzCapabilities {
|
||||
typedef struct _vzCapabilities vzCapabilities;
|
||||
typedef struct _vzCapabilities *vzCapabilitiesPtr;
|
||||
|
||||
/* +2 to keep enclosing { and } */
|
||||
# define VIR_UUID_STRING_BRACED_BUFLEN (VIR_UUID_STRING_BUFLEN + 2)
|
||||
|
||||
struct _vzDriver {
|
||||
virObjectLockable parent;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user