[Libguestfs] [libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts

Eric Blake eblake at redhat.com
Tue Sep 29 11:47:47 UTC 2020


On 9/29/20 6:26 AM, Richard W.M. Jones wrote:
> On Mon, Sep 28, 2020 at 05:05:16PM -0500, Eric Blake wrote:
>> +  "get_meta_context", {
>> +    default_call with
>> +    args = [ Int "i" ]; ret = RString;
> 
> Previously we have only used the Int parameter type for things which
> are plausibly integers (timeouts, signal numbers).  This one really
> ought to be an unsigned or better still a size_t.  Would it help if I
> provided a SizeT type for the generator?

If we take SizeT as parameter for this one, we probably want to return 
an ssize_t for get_nr_meta_contexts, rather than RInt.  Does the name 
RSizeT that returns ssize_t make sense?

> 
> But in general yes this patch is obvious so ACK.
> 
> Rich.
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list