mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +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 *password)
|
||||
{
|
||||
int ret = -1;
|
||||
vzDomObjPtr privdom = dom->privateData;
|
||||
PRL_HANDLE job = PRL_INVALID_HANDLE;
|
||||
|
||||
job = PrlVm_BeginEdit(privdom->sdkdom);
|
||||
if (PRL_FAILED(waitDomainJob(job, dom)))
|
||||
goto cleanup;
|
||||
|
||||
job = PrlVm_SetUserPasswd(privdom->sdkdom,
|
||||
user,
|
||||
password,
|
||||
0);
|
||||
|
||||
if (PRL_FAILED(waitDomainJob(job, dom)))
|
||||
goto cleanup;
|
||||
return -1;
|
||||
|
||||
job = PrlVm_CommitEx(privdom->sdkdom, 0);
|
||||
if (PRL_FAILED(waitDomainJob(job, dom)))
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user