From: Matthias Bolte Date: Sat, 6 Nov 2010 17:49:07 +0000 (+0100) Subject: Allow virDomainGetMemoryParameters on read-only connections X-Git-Tag: v0.8.6~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9562ca3f920d0d7f0b9be523930ff6fd8e8ea27b;p=thirdparty%2Flibvirt.git Allow virDomainGetMemoryParameters on read-only connections Also fix a typo in the documentation of the function. --- diff --git a/src/libvirt.c b/src/libvirt.c index aebd3bc325..2ffb2d93ff 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -3096,7 +3096,7 @@ error: * } * * 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. */ @@ -3115,10 +3115,6 @@ virDomainGetMemoryParameters(virDomainPtr domain, virDispatchError(NULL); return -1; } - if (domain->conn->flags & VIR_CONNECT_RO) { - virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__); - goto error; - } if ((nparams == NULL) || (*nparams < 0)) { virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__); goto error;