mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
vz: minor cleanup in prlsdkDomainSetUserPassword
No need begin job for asynchronous operation. Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
This commit is contained in:
parent
af4b0ed03e
commit
f8912d0527
@ -3927,30 +3927,18 @@ prlsdkDomainSetUserPassword(virDomainObjPtr dom,
|
|||||||
const char *user,
|
const char *user,
|
||||||
const char *password)
|
const char *password)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
vzDomObjPtr privdom = dom->privateData;
|
vzDomObjPtr privdom = dom->privateData;
|
||||||
PRL_HANDLE job = PRL_INVALID_HANDLE;
|
PRL_HANDLE job = PRL_INVALID_HANDLE;
|
||||||
|
|
||||||
job = PrlVm_BeginEdit(privdom->sdkdom);
|
|
||||||
if (PRL_FAILED(waitDomainJob(job, dom)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
job = PrlVm_SetUserPasswd(privdom->sdkdom,
|
job = PrlVm_SetUserPasswd(privdom->sdkdom,
|
||||||
user,
|
user,
|
||||||
password,
|
password,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
if (PRL_FAILED(waitDomainJob(job, dom)))
|
if (PRL_FAILED(waitDomainJob(job, dom)))
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
job = PrlVm_CommitEx(privdom->sdkdom, 0);
|
return 0;
|
||||||
if (PRL_FAILED(waitDomainJob(job, dom)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user