Re: [PATCH 3/7] add virAgentCommand()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/20/2012 02:16 AM, MATSUDA, Daiki wrote:
> (2012/08/16 22:13), Martin Kletzander wrote:
>> On 08/15/2012 03:36 AM, MATSUDA Daiki wrote:
[...]
>>> +char *
>>> +virAgentCommand(virDomainPtr domain,
>>> +                const char *cmd,
>>> +                int timeout,
>>> +                unsigned int flags)
>>> +{
>>> +    virConnectPtr conn;
>>> +
>>> +    VIR_DEBUG("domain=%p, cmd=%s, timeout=%d, flags=%x",
>>> +              domain, cmd, timeout, flags);
>>> +
>>> +    if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
>>> +        virLibDomainError(NULL, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
>>> +        virDispatchError(NULL);
>>> +        return NULL;
>>> +    }
>>> +
>>> +    conn = domain->conn;
>>> +
>>> +    if (conn->driver->qemuAgentCommand) {
>>> +        return conn->driver->qemuAgentCommand(domain, cmd, timeout,
>>> flags);
>>
>> Shouldn't this be allowed only for read-only connections?
> 
> I do not uderstand what you say.
> 

I meant a check similar to this:

if (conn->flags & VIR_CONNECT_RO)
     virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]