提交 9562ca3f 编写于 作者: M Matthias Bolte

Allow virDomainGetMemoryParameters on read-only connections

Also fix a typo in the documentation of the function.
上级 c690cf83
...@@ -3096,7 +3096,7 @@ error: ...@@ -3096,7 +3096,7 @@ error:
* } * }
* *
* This function requires privileged access to the hypervisor. This function * This function requires privileged access to the hypervisor. This function
* expects the caller to allocate the @param * expects the caller to allocate the @params.
* *
* Returns -1 in case of error, 0 in case of success. * Returns -1 in case of error, 0 in case of success.
*/ */
...@@ -3115,10 +3115,6 @@ virDomainGetMemoryParameters(virDomainPtr domain, ...@@ -3115,10 +3115,6 @@ virDomainGetMemoryParameters(virDomainPtr domain,
virDispatchError(NULL); virDispatchError(NULL);
return -1; return -1;
} }
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
}
if ((nparams == NULL) || (*nparams < 0)) { if ((nparams == NULL) || (*nparams < 0)) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__); virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册