From 475835e38b0ba69ec241742976708cc007b0471b Mon Sep 17 00:00:00 2001 From: Nikolay Shirokovskiy Date: Fri, 20 May 2016 10:26:46 +0300 Subject: [PATCH] vz: get rid of unused home state variable in private domain obj Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_sdk.c | 16 ---------------- src/vz/vz_utils.h | 1 - 2 files changed, 17 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 586c65668e..5f89079022 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -465,7 +465,6 @@ prlsdkDomObjFreePrivate(void *p) PrlHandle_Free(pdom->sdkdom); PrlHandle_Free(pdom->stats); - VIR_FREE(pdom->home); VIR_FREE(p); }; @@ -1504,7 +1503,6 @@ prlsdkLoadDomain(vzDriverPtr driver, virDomainObjPtr dom) virDomainDefPtr def = NULL; vzDomObjPtr pdom = NULL; VIRTUAL_MACHINE_STATE domainState; - char *home = NULL; PRL_RESULT pret; PRL_UINT32 ram; @@ -1562,17 +1560,6 @@ prlsdkLoadDomain(vzDriverPtr driver, virDomainObjPtr dom) pret = PrlVmCfg_GetEnvId(sdkdom, &envId); prlsdkCheckRetGoto(pret, error); - if (!(home = prlsdkGetStringParamVar(PrlVmCfg_GetHomePath, sdkdom))) - goto error; - - /* For VMs home is actually /directory/config.pvs */ - if (!IS_CT(def)) { - /* Get rid of /config.pvs in path string */ - char *s = strrchr(home, '/'); - if (s) - *s = '\0'; - } - pret = PrlVmCfg_GetAutoStart(sdkdom, &autostart); prlsdkCheckRetGoto(pret, error); if (autostart != PAO_VM_START_ON_LOAD && @@ -1618,8 +1605,6 @@ prlsdkLoadDomain(vzDriverPtr driver, virDomainObjPtr dom) virDomainDefFree(dom->def); dom->def = def; pdom->id = envId; - VIR_FREE(pdom->home); - pdom->home = home; prlsdkConvertDomainState(domainState, envId, dom); @@ -1632,7 +1617,6 @@ prlsdkLoadDomain(vzDriverPtr driver, virDomainObjPtr dom) return 0; error: PrlHandle_Free(sdkdom); - VIR_FREE(home); virDomainDefFree(def); return -1; } diff --git a/src/vz/vz_utils.h b/src/vz/vz_utils.h index f5bb40e9c8..a65ad21290 100644 --- a/src/vz/vz_utils.h +++ b/src/vz/vz_utils.h @@ -96,7 +96,6 @@ typedef struct _vzConn *vzConnPtr; struct vzDomObj { int id; - char *home; PRL_HANDLE sdkdom; PRL_HANDLE stats; }; -- GitLab