WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH V4] libxl, Introduce a QMP client

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH V4] libxl, Introduce a QMP client
From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Date: Wed, 22 Jun 2011 14:09:27 +0100
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 22 Jun 2011 06:12:55 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=9v5Si9CRl2vkzyyJ6SmzrIj4RHoM+xHvDt1w6iGZmDA=; b=F6uFUcz6qHblZlsLfuZMyX9O1fvdu/fhBlO/wUzZCP6t9+SGuIixr16y3gYR/4PbVh NhPgOjgxJy/1la0lr6jbYvdjAnc7nfqnGsbFcwWKRbvEoOjU1LzD2cS/IMiJJhiCPFOa tfaQsAHUc6sZeqvEMB6HacKP7D/QYuod1548g=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=uBhmz6MlATwnztqDwJqF+5aF9QcKKsXmDMQCCmKqv6kHCBwiLxxj3O1WDNWDxQPfym B4jdTEdsLPSrdmrjPFFXfxO0u38U7zqRvuNALvAILJbFqnWHQDg9mXzPQmQ6u72HOOpK LzBdIljFsuL+gMs+cWZF7PquorcfntYHvG6CE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19967.24103.640384.969388@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1308324754-19159-1-git-send-email-anthony.perard@xxxxxxxxxx> <19967.24103.640384.969388@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, Jun 20, 2011 at 15:50, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> anthony.perard@xxxxxxxxxx writes ("[Xen-devel] [PATCH V4] libxl, Introduce a 
> QMP client"):
>> QMP stands for QEMU Monitor Protocol and it is used to query information
>> from QEMU or to control QEMU.
>
> Thanks for this; it's coming along.  I have some comments....
>

[...]

>> +/* QMP Command that can be send */
>> +enum libxl__qmp_command_e {
>> +    QMP_COMMAND_QUERY_CHARDEV,
>> +    QMP_COMMAND_NUMBER,
>> +};
> ...
>> +_hidden int libxl__qmp_send_command(libxl__qmp_handler *qmp, 
>> libxl__qmp_command_e command);
>
> I'm not entirely convinced by this interface.  Wouldn't it be better
> to have a specific function for each command ?  After all commands may
> have arguments.  Something like:
>
> _hidden int libxl__qmp_send_query_chardev(libxl__qmp_handler *qmp);

Indeed, it should be better to have specific functions. Some commands
will have arguments. And have a generic function for all of them will
maybe not be easy and not clear.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel