From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4tfd-00027I-Q4 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 09:11:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4tfY-0002GO-Gb for qemu-devel@nongnu.org; Fri, 24 Aug 2012 09:11:29 -0400 Received: from smtp.citrix.com ([66.165.176.89]:6512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4tfY-0002GI-C4 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 09:11:24 -0400 Message-ID: <50377DAD.6000405@citrix.com> Date: Fri, 24 Aug 2012 14:12:13 +0100 From: Julien Grall MIME-Version: 1.0 References: <557fe87e4a6c0defdc6549e23e8e5e7b2ebb7a9f.1345552068.git.julien.grall@citrix.com> <1345728948.12501.98.camel@zakaz.uk.xensource.com> In-Reply-To: <1345728948.12501.98.camel@zakaz.uk.xensource.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Xen-devel] [XEN][RFC PATCH V2 14/17] xl-parsing: Parse new device_models option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ian Campbell Cc: "christian.limpach@gmail.com" , "xen-devel@lists.xen.org" , "qemu-devel@nongnu.org" , Stefano Stabellini On 08/23/2012 02:35 PM, Ian Campbell wrote: > On Wed, 2012-08-22 at 13:32 +0100, Julien Grall wrote: > >> Add new option "device_models". The user can specify the capability of the >> QEMU (ui, vifs, ...). This option only works with QEMU upstream (qemu-xen). >> >> For instance: >> device_models= [ 'name=all,vifs=nic1', 'name=qvga,ui', 'name=qide,ide' ] >> > iirc you can give multiple vifs -- what does that syntax look like? > > vifs=nic1;nic2 > I didn't ask before -- what does naming the dm give you? Is it just used > for ui things like logging or can you cross reference this in some way? > > It's used for logging and in qemu log filename. It's not a mandatory. >> Signed-off-by: Julien Grall >> --- >> tools/libxl/Makefile | 2 +- >> tools/libxl/libxlu_dm.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++ >> tools/libxl/libxlutil.h | 5 ++ >> tools/libxl/xl_cmdimpl.c | 29 +++++++++++++- >> 4 files changed, 130 insertions(+), 2 deletions(-) >> create mode 100644 tools/libxl/libxlu_dm.c >> >> diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile >> index 47fb110..2b58721 100644 >> --- a/tools/libxl/Makefile >> +++ b/tools/libxl/Makefile >> @@ -79,7 +79,7 @@ AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h _paths.h \ >> AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c >> AUTOSRCS += _libxl_save_msgs_callout.c _libxl_save_msgs_helper.c >> LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \ >> - libxlu_disk_l.o libxlu_disk.o libxlu_vif.o libxlu_pci.o >> + libxlu_disk_l.o libxlu_disk.o libxlu_vif.o libxlu_pci.o libxlu_dm.o >> $(LIBXLU_OBJS): CFLAGS += $(CFLAGS_libxenctrl) # For xentoollog.h >> >> CLIENTS = xl testidl libxl-save-helper >> diff --git a/tools/libxl/libxlu_dm.c b/tools/libxl/libxlu_dm.c >> new file mode 100644 >> index 0000000..9f0a347 >> --- /dev/null >> +++ b/tools/libxl/libxlu_dm.c >> @@ -0,0 +1,96 @@ >> +#include "libxl_osdeps.h" /* must come before any other headers */ >> +#include >> +#include "libxlu_internal.h" >> +#include "libxlu_cfg_i.h" >> + >> +static void split_string_into_string_list(const char *str, >> + const char *delim, >> + libxl_string_list *psl) >> > Is this a cut-n-paste of the one in xl_cmdimpl.c or did it change? > > Probably better to add this as a common utility function somewhere. > It's nearly the same, except it's skip blank at the beginning of a value. For instance if we have 'foo; bar', the function will return ['foo', 'bar']. -- Julien