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

Re: [libvirt] [PATCH 2/3] Add RPC implementation for virDomainOpenGraphicsFd



On 08/26/2014 06:41 PM, Peter Krempa wrote:
> On 08/25/14 20:22, Ján Tomko wrote:
>> ---
>>  daemon/remote.c              | 42 ++++++++++++++++++++++++++++++++++++++++++
>>  src/remote/remote_driver.c   | 39 +++++++++++++++++++++++++++++++++++++++
>>  src/remote/remote_protocol.x | 15 ++++++++++++++-
>>  src/rpc/virnetmessage.c      | 26 ++++++++++++++++++++++++++
>>  src/rpc/virnetmessage.h      |  3 +++
>>  5 files changed, 124 insertions(+), 1 deletion(-)
>>
>> diff --git a/daemon/remote.c b/daemon/remote.c
>> index ea16789..bd3b377 100644
>> --- a/daemon/remote.c
>> +++ b/daemon/remote.c
>> @@ -4399,6 +4399,48 @@ remoteDispatchDomainOpenGraphics(virNetServerPtr server ATTRIBUTE_UNUSED,
>>  }
>>  

>> +
>> +    if (virDomainOpenGraphicsFD(dom,
>> +                                args->idx,
>> +                                &fd,
>> +                                args->flags) < 0)
>> +        goto cleanup;
>> +
>> +    if (virNetMessageAddFD(msg, fd) < 0)
>> +        goto cleanup;
>> +
>> +    rv = 1;
> 
> 1 ? You probably should return 0 here.
> 

This is necessary to let the dispatcher know we are passing a FD back. I have
added an explanatory comment.

> 
> Fails syntax-check:
>   GEN      remote_protocol-struct
> --- remote_protocol-structs	2014-08-26 18:24:38.283925041 +0200
> +++ remote_protocol-struct-t3	2014-08-26 18:39:19.297274744 +0200
> @@ -2153,6 +2153,11 @@
>          u_int                      idx;
>          u_int                      flags;
>  };
> +struct remote_domain_open_graphics_fd_args {
> +        remote_nonnull_domain      dom;
> +        u_int                      idx;
> +        u_int                      flags;
> +};
>  struct remote_node_suspend_for_duration_args {
>          u_int                      target;
>          uint64_t                   duration;
> @@ -2862,4 +2867,5 @@
>          REMOTE_PROC_NODE_GET_FREE_PAGES = 340,
>          REMOTE_PROC_NETWORK_GET_DHCP_LEASES = 341,
>          REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES = 342,
> +        REMOTE_PROC_DOMAIN_OPEN_GRAPHICS_FD = 343,
>  };
> make[3]: *** [remote_protocol-struct] Error 1
> make[3]: Leaving directory `/home/pipo/libvirt/src'
> 
> You probably don't have one of the tools installed.

Yes, 'dwarves' was the missing tool (and a git clean was needed too).

> 
> I'd like to see a v2.

Sent.

> 
> Peter

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


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