[Qemu-devel] [PATCH v4] QemuOpt: add unit tests

2014-05-19 Thread Leandro Dorileo
Cover basic aspects and API usage for QemuOpt. The current implementation covers the API's planned to be changed by Chunyan Liu in his QEMUOptionParameter replacement/cleanup job. Other APIs should be covered in future improvements. Signed-off-by: Leandro Dorileo --- Notes:

Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-05-19 Thread Leandro Dorileo
On Fri, May 02, 2014 at 10:40:33AM +0200, Stefan Hajnoczi wrote: > On Tue, Mar 25, 2014 at 10:27:19AM -0300, Leandro Dorileo wrote: > > Cover basic aspects and API usage for QemuOpt. The current implementation > > covers the API's planned to be changed b

Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-05-19 Thread Leandro Dorileo
On Wed, Apr 30, 2014 at 10:28:26AM +0200, Markus Armbruster wrote: > Leandro Dorileo writes: > > > Hi Andreas, > > > > On Mon, Apr 28, 2014 at 09:02:12PM +0200, Andreas Färber wrote: > >> Am 28.04.2014 20:55, schrieb Leandro Dorileo: > >> > ping? >

Re: [Qemu-devel] [PATCH V26 00/32] replace QEMUOptionParameter with QemuOpts

2014-05-19 Thread Leandro Dorileo
u help to have a look at the new update? I've sent it about 10 > days ago. It addressed all Eric's comments in last version and two > memory free fix to address iotest issue. Hope it's the final work and > won't take you more time :-) > > The thread has been cut into two, since the git-send-email died in the > middle at the 1st time sending. Please refer to: I'll take a look at it, thanks. -- Leandro Dorileo

Re: [Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter

2014-05-01 Thread Leandro Dorileo
ed-off-by: Dong Xu Wang > Signed-off-by: Chunyan Liu Did you send the patch series twice? I commented in the first v26 emails... -- Leandro Dorileo > --- > Changes to V25: > * fix Eric's comments: > * update bdrv_create_co_entry and bdrv_amend_options code, to le

Re: [Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter

2014-05-01 Thread Leandro Dorileo
o out; > } > > -if (encryption && encryption->value.n) { > +if (encryption) { > error_report("Compression and encryption not supported at " > "the same time"); > ret =

Re: [Qemu-devel] [PATCH V26 11/32] QemuOpts: check NULL input for qemu_opts_del

2014-05-01 Thread Leandro Dorileo
On Tue, Apr 29, 2014 at 05:08:20PM +0800, Chunyan Liu wrote: > To simplify later using of qemu_opts_del, accept NULL input. > > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Eric Blake > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > util/qemu-option

Re: [Qemu-devel] [PATCH V26 09/32] QemuOpts: add conversion between QEMUOptionParameter to QemuOpts

2014-05-01 Thread Leandro Dorileo
gt; QemuOpts. > > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Eric Blake > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > include/qemu/option.h | 9 +++ > util/qemu-option.c| 153 > ++ > 2 fil

Re: [Qemu-devel] [PATCH V26 08/32] QemuOpts: add qemu_opts_print_help to replace print_option_help

2014-05-01 Thread Leandro Dorileo
d-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > include/qemu/option.h | 1 + > util/qemu-option.c| 13 + > 2 files changed, 14 insertions(+) > > diff --git a/include/qemu/option.h b/include/qemu/option.h > index 6653e43..fbf5dc2 100644 > ---

Re: [Qemu-devel] [PATCH V26 07/32] QemuOpts: add qemu_opt_get_*_del functions for replace work

2014-05-01 Thread Leandro Dorileo
is (const char *). > > Reviewed-by: Eric Blake > Signed-off-by: Dong Xu Wang > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > include/qemu/option.h | 6 +++ > util/qemu-option.c| 116 > -- >

Re: [Qemu-devel] [PATCH V26 06/32] QemuOpts: move qemu_opt_del ahead for later calling

2014-05-01 Thread Leandro Dorileo
gt; Reviewed-by: Eric Blake > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > util/qemu-option.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/util/qemu-option.c b/util/qemu-option.c > index 69cdf3f..4d2d4

Re: [Qemu-devel] [PATCH V26 05/32] QemuOpts: change opt->name|str from (const char *) to (char *)

2014-05-01 Thread Leandro Dorileo
using the correct type and malloced strings everywhere, the > usage of this struct becomes clearer. > > Reviewed-by: Eric Blake > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > include/qemu/option_int.h | 4 ++-- > qapi/opts-visitor.c | 10 ++

Re: [Qemu-devel] [PATCH V26 04/32] qapi: output def_value_str when query command line options

2014-05-01 Thread Leandro Dorileo
On Tue, Apr 29, 2014 at 05:08:13PM +0800, Chunyan Liu wrote: > Change qapi interfaces to output the newly added def_value_str when querying > command line options. > > Signed-off-by: Dong Xu Wang > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > Changes

Re: [Qemu-devel] [PATCH V26 03/32] QemuOpts: repurpose qemu_opts_print to replace print_option_parameters

2014-05-01 Thread Leandro Dorileo
tent with > print_option_parameters, remove last printf and print size/number with > opt->value.uint instead of opt->str. > > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > util/qemu-option.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > d

Re: [Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOptDesc

2014-05-01 Thread Leandro Dorileo
g Xu Wang > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > Changes to V25: > * split v25 patch into two: this one and next one. > * this patch is the same as v22 which is reviewed-by Eric. > > include/qemu/option.h | 3 ++- > util/qemu-option.

Re: [Qemu-devel] [PATCH V26 01/32] QemuOpts: move find_desc_by_name ahead for later calling

2014-05-01 Thread Leandro Dorileo
On Tue, Apr 29, 2014 at 05:08:10PM +0800, Chunyan Liu wrote: > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Eric Blake > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > util/qemu-option.c | 28 ++-- > 1 file changed, 14 insertion

Re: [Qemu-devel] [PATCH V26 00/32] replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Leandro Dorileo
Hi Chunyan, I haven't found enough time the last versions you've sent for review. I've buit your patch series and the final result builds nicely, but it fails the test 061, I haven't had the time to investigate it yet. I'm leaving on vacation next Friday so I'll try to review all you patches b

Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-04-28 Thread Leandro Dorileo
Hi Andreas, On Mon, Apr 28, 2014 at 09:02:12PM +0200, Andreas Färber wrote: > Am 28.04.2014 20:55, schrieb Leandro Dorileo: > > ping? > > > > > > On Tue, Mar 25, 2014 at 10:27:19AM -0300, Leandro Dorileo wrote: > >> Cover basic aspects and API usage for

Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-04-28 Thread Leandro Dorileo
ping? On Tue, Mar 25, 2014 at 10:27:19AM -0300, Leandro Dorileo wrote: > Cover basic aspects and API usage for QemuOpt. The current implementation > covers the API's planned to be changed by Chunyan Liu in his > QEMUOptionParameter > replacement/cleanup job. > > Other AP

Re: [Qemu-devel] [PATCH v24 00/31] replace QEMUOptionParameter with QemuOpts

2014-04-16 Thread Leandro Dorileo
On Thu, Apr 10, 2014 at 11:20:46AM +0800, Chunyan Liu wrote: > 2014-04-08 9:12 GMT+08:00 Leandro Dorileo : > > > On Thu, Apr 03, 2014 at 05:54:18PM +0800, Chunyan Liu wrote: > > > This patch series is to replace QEMUOptionParameter with QemuOpts, so > > that only >

Re: [Qemu-devel] [PATCH v24 02/31] QemuOpts: add def_value_str to QemuOptDesc

2014-04-16 Thread Leandro Dorileo
On Thu, Apr 10, 2014 at 11:36:05AM +0800, Chunyan Liu wrote: > 2014-04-08 9:31 GMT+08:00 Leandro Dorileo : > > > On Thu, Apr 03, 2014 at 05:54:20PM +0800, Chunyan Liu wrote: > > > Add def_value_str (default value) to QemuOptDesc, to replace function of > >

Re: [Qemu-devel] [PATCH v24 05/31] QemuOpts: move qemu_opt_del ahead for later calling

2014-04-07 Thread Leandro Dorileo
gt; Reviewed-by: Eric Blake > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > util/qemu-option.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/util/qemu-option.c b/util/qemu-option.c > index eab5102..25abd

Re: [Qemu-devel] [PATCH v24 04/31] QemuOpts: change opt->name|str from (const char *) to (char *)

2014-04-07 Thread Leandro Dorileo
using the correct type and malloced strings everywhere, the > usage of this struct becomes clearer. > > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > Changes: > * Add explaination to this change. > * Remove extra space before char *name, char *str

Re: [Qemu-devel] [PATCH v24 03/31] qapi: output def_value_str when query command line options

2014-04-07 Thread Leandro Dorileo
ult value - set if option not informed (since 2.1). But if you feel comfortable with the current text you can add: Reviewed-by: Leandro Dorileo -- Leandro Dorileo > # Since 1.5 > ## > { 'type': 'CommandLineParameterInfo', >'data': { 'name&#

Re: [Qemu-devel] [PATCH v24 07/31] QemuOpts: add qemu_opts_print_help to replace print_option_help

2014-04-07 Thread Leandro Dorileo
> +while (desc && desc->name) { > +printf("%-16s %s\n", desc->name, > + desc->help ? desc->help : "No description available"); > +desc++; > +} > +} > /* -- */ > > static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name) > -- > 1.7.12.4 > -- Leandro Dorileo

Re: [Qemu-devel] [PATCH v24 02/31] QemuOpts: add def_value_str to QemuOptDesc

2014-04-07 Thread Leandro Dorileo
gt; +fprintf(stderr, "%s=\"%s\" ", opt->name, opt->str); > +} > +return; > +} > +for (; desc && desc->name; desc++) { > +const char *value; > +QemuOpt *opt = qemu_opt_find(opts, desc->name); > + > +value = opt ? opt->str : desc->def_value_str; > +if (!value) { > +continue; > +} > +if (desc->type == QEMU_OPT_STRING) { > +fprintf(stderr, "%s='%s' ", desc->name, value); > +} else { > +fprintf(stderr, "%s=%s ", desc->name, value); > +} > } > fprintf(stderr, "\n"); I see you removed this fprintf() in the commit afe65f5c92694d551aaebc128233b623e8665d5e Please do this change in this commit and avoid breaking the block tests in further commits. -- Leandro Dorileo > -return 0; > } > > static int opts_do_parse(QemuOpts *opts, const char *params, > -- > 1.7.12.4 >

Re: [Qemu-devel] [PATCH v24 01/31] QemuOpts: move find_desc_by_name ahead for later calling

2014-04-07 Thread Leandro Dorileo
On Thu, Apr 03, 2014 at 05:54:19PM +0800, Chunyan Liu wrote: > Reviewed-by: Eric Blake > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > util/qemu-option.c | 28 ++-- > 1 file changed, 14 insertions(+), 14 deletions(-) > > d

Re: [Qemu-devel] [PATCH v24 00/31] replace QEMUOptionParameter with QemuOpts

2014-04-07 Thread Leandro Dorileo
ce QEMUOptionParameter with QemuOpts > vpc.c: replace QEMUOptionParameter with QemuOpts > cleanup QEMUOptionParameter > QemuOpts: cleanup tmp 'allocated' member from QemuOptsList block/nfs.c is missing conversion. Have you tested your own patches? A simple git am &&

Re: [Qemu-devel] [PATCH v5 for 2.0 3/3] abort QEMU if group name in option table doesn't match with defined option name

2014-03-28 Thread Leandro Dorileo
d(list->name)) { > +error_report("Didn't find a matched option definition, " > + "group name (%s) of option table must match > with " > + "defined option name (Since 2.0)", list->

Re: [Qemu-devel] [RFC PATCH 2/4] qemu-log: support simple pid substitution in logfile

2014-03-28 Thread Leandro Dorileo
On Thu, Mar 27, 2014 at 09:59:21AM +, Alex Bennée wrote: > > Leandro Dorileo writes: > > > On Wed, Mar 26, 2014 at 02:37:12PM +, alex.ben...@linaro.org wrote: > >> From: Alex Bennée > >> > >> When debugging stuff that occurs over several

Re: [Qemu-devel] [RFC PATCH 2/4] qemu-log: support simple pid substitution in logfile

2014-03-26 Thread Leandro Dorileo
atch_simple("^[^%]+%d[^%]+$", filename, 0, 0)) { > +logfilename = g_strdup_printf(filename, getpid()); > +} else { > +g_error("Bad logfile format: %s", filename); > +} > +} else { > + logfilename = g_strdup(filename); > +} > qemu_log_close(); > qemu_set_log(qemu_loglevel); > } Looks good to me. -- Leandro Dorileo

Re: [Qemu-devel] [RFC PATCH 1/4] qemu-log: correct help text for -d cpu

2014-03-26 Thread Leandro Dorileo
t; - "show CPU state before block translation" }, > + "show CPU registers before each executed TB (lots of logs)" }, what about s/lots of logs/hight volume log/ or maybe s/lots of logs/hight volume/ ? Regards -- Leandro Dorileo > { CPU_LOG_PCALL, "p

Re: [Qemu-devel] [PATCH v23 00/32] replace QEMUOptionParameter with QemuOpts

2014-03-25 Thread Leandro Dorileo
On Tue, Mar 25, 2014 at 06:09:40PM +, Leandro Dorileo wrote: > On Fri, Mar 21, 2014 at 06:12:11PM +0800, Chunyan Liu wrote: > > This patch series is to replace QEMUOptionParameter with QemuOpts, so that > > only > > one Qemu Option structure is kept in QEMU code. > &

Re: [Qemu-devel] [PATCH v23 11/32] qemu_opts_print: change fprintf stderr to printf

2014-03-25 Thread Leandro Dorileo
printf("%s=%s ", desc->name, value); > } > } > -fprintf(stderr, "\n"); > +printf("\n"); This new line is breaking most of the io tests since it changes the expected output. Regards... -- Leandro Dorileo > } > > static int opts_do_parse(QemuOpts *opts, const char *params, > -- > 1.7.12.4 > >

Re: [Qemu-devel] [PATCH v23 12/32] qcow2.c: remove 'assigned' check in amend

2014-03-25 Thread Leandro Dorileo
preallocation")) { > -fprintf(stderr, "Cannot change preallocation mode.\n"); > -return -ENOTSUP; > +/* Cannot change preallocation mode. Ignore it. */ You're ignoring/silencing an informed option, I think it's fear enough to noti

Re: [Qemu-devel] [PATCH v23 14/32] vvfat.c: handle cross_driver's create_options and create_opts

2014-03-25 Thread Leandro Dorileo
; if (ret < 0) { > qerror_report_err(local_err); > error_free(local_err); > @@ -2955,6 +2962,8 @@ static int enable_write_target(BDRVVVFATState *s) > return 0; > > err: > +qemu_opts_del(opts); > +qemu_opts_free(create_opts); > g_free(s->qcow_filename); > s->qcow_filename = NULL; > return ret; > -- > 1.7.12.4 > > -- Leandro Dorileo

Re: [Qemu-devel] [PATCH v23 09/32] add qemu_opts_append to repalce append_option_parameters

2014-03-25 Thread Leandro Dorileo
On Fri, Mar 21, 2014 at 06:12:20PM +0800, Chunyan Liu wrote: > For later merge .create_opts of drv and proto_drv in qemu-img commands. > > Signed-off-by: Chunyan Liu Reviewed-by: Leandro Dorileo > --- > Changes: > * Following Eric's suggestion, qemu_opts_append(

Re: [Qemu-devel] [PATCH v23 07/32] add qemu_opts_print_help to replace print_option_help

2014-03-25 Thread Leandro Dorileo
("%-16s %s\n", list->desc[i].name, > + list->desc[i].help ? > + list->desc[i].help : "No description available"); > +} > +} > /* -- */ > > static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name) > -- > 1.7.12.4 > > -- Leandro Dorileo

Re: [Qemu-devel] [PATCH v23 04/32] change opt->name and opt->str from (const char *) to (char *)

2014-03-25 Thread Leandro Dorileo
pattern. I may be missing something completely obvious here but if you really need this change could you introduce a test in the test-opts-visitor.c test suite so we can understand the problem you're fixing here? Regards... -- Leandro Dorileo > > const QemuOptDesc *desc; >

Re: [Qemu-devel] [PATCH v23 31/32] cleanup QEMUOptionParameter

2014-03-25 Thread Leandro Dorileo
ptsList *params_to_opts(QEMUOptionParameter *list) > -{ > -QemuOptsList *opts = NULL; > -size_t num_opts, i = 0; > - > -if (!list

Re: [Qemu-devel] [PATCH v23 00/32] replace QEMUOptionParameter with QemuOpts

2014-03-25 Thread Leandro Dorileo
onParameter > cleanup tmp 'mallocd' member from QemuOptsList The series is still breaking the build and the io tests. I picked some patches in the series to see if it was supposed to work, I could not build without fixing some stuffs (like I commented on [31/32]). After fixing the build stuffs I could not successfuly run the io tests. Testing with all your patches applied I could also not run the io tests, they all failed. Regards... -- Leandro Dorileo

[Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-03-25 Thread Leandro Dorileo
Cover basic aspects and API usage for QemuOpt. The current implementation covers the API's planned to be changed by Chunyan Liu in his QEMUOptionParameter replacement/cleanup job. Other APIs should be covered in future improvements. Signed-off-by: Leandro Dorileo Reviewed-by: Eric

[Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-03-25 Thread Leandro Dorileo
Cover basic aspects and API usage for QemuOpt. The current implementation covers the API's planned to be changed by Chunyan Liu in his QEMUOptionParameter replacement/cleanup job. Other APIs should be covered in future improvements. Signed-off-by: Leandro Dorileo Reviewed-by: Eric

[Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-03-25 Thread Leandro Dorileo
Cover basic aspects and API usage for QemuOpt. The current implementation covers the API's planned to be changed by Chunyan Liu in his QEMUOptionParameter replacement/cleanup job. Other APIs should be covered in future improvements. Signed-off-by: Leandro Dorileo Reviewed-by: Eric

Re: [Qemu-devel] [PATCH] qemu-img: mandate argument to 'qemu-img check --repair'

2014-03-24 Thread Leandro Dorileo
, "leaks")) { > (gdb) bt > 0 img_check (argc=6, argv=0x7fffab9b8a10) at qemu-img.c:588 > 1 __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 > 2 _start () > (gdb) > > Signed-off-by: Prasad Joshi Patch looks good to me. Reviewed-by: Leandro Dorileo > --

Re: [Qemu-devel] [PATCH] qcow2: Remove FIXME comment, already fixed

2014-03-24 Thread Leandro Dorileo
On Mon, Mar 24, 2014 at 02:06:15PM +0800, Deepak Kathayat wrote: > > Signed-off-by: Deepak Kathayat Reviewed-by: Leandro Dorileo > --- > block/qcow2.h |1 - > 1 file changed, 1 deletion(-) > > diff --git a/block/qcow2.h b/block/qcow2.h > index 0b0eac8..25663d4 10

Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts

2014-03-24 Thread Leandro Dorileo
Hi Chunyan, On Mon, Mar 24, 2014 at 11:02:14AM +0800, Chunyan Liu wrote: > 2014-03-21 20:31 GMT+08:00 Leandro Dorileo : > > > On Fri, Mar 21, 2014 at 06:09:22PM +0800, Chunyan Liu wrote: > > > 2014-03-21 8:07 GMT+08:00 Leandro Dorileo : > > > > > > >

Re: [Qemu-devel] [PATCH v2] QemuOpt: add unit tests

2014-03-21 Thread Leandro Dorileo
Hi Laszlo, On Fri, Mar 21, 2014 at 04:30:32PM +0100, Laszlo Ersek wrote: > On 03/21/14 15:56, Leandro Dorileo wrote: > > Hi Eric, > > > > On Fri, Mar 21, 2014 at 08:37:40AM -0600, Eric Blake wrote: > >> On 03/17/2014 05:10 PM, Leandro Dorileo wrote: > >>

Re: [Qemu-devel] [PATCH v2] QemuOpt: add unit tests

2014-03-21 Thread Leandro Dorileo
Hi Eric, On Fri, Mar 21, 2014 at 08:37:40AM -0600, Eric Blake wrote: > On 03/17/2014 05:10 PM, Leandro Dorileo wrote: > > Cover basic aspects and API usage for QemuOpt. The current implementation > > covers the API's planned to be changed by Chunyan Liu in his >

Re: [Qemu-devel] [PATCH 09/26] iscsi: migrate iscsi driver QemuOptionParameter usage

2014-03-21 Thread Leandro Dorileo
On Fri, Mar 21, 2014 at 02:42:35PM +0100, Peter Lieven wrote: > On 21.03.2014 14:31, Leandro Dorileo wrote: > >On Fri, Mar 21, 2014 at 07:43:44AM +0100, Peter Lieven wrote: > >>On 21.03.2014 01:13, Leandro Dorileo wrote: > >>>Do the directly migration from Qemu

Re: [Qemu-devel] [PATCH 09/26] iscsi: migrate iscsi driver QemuOptionParameter usage

2014-03-21 Thread Leandro Dorileo
On Fri, Mar 21, 2014 at 01:31:42PM +, Leandro Dorileo wrote: > On Fri, Mar 21, 2014 at 07:43:44AM +0100, Peter Lieven wrote: > > On 21.03.2014 01:13, Leandro Dorileo wrote: > > >Do the directly migration from QemuOptionParameter to QemuOpts on > > >iscsi block drive

Re: [Qemu-devel] [PATCH 09/26] iscsi: migrate iscsi driver QemuOptionParameter usage

2014-03-21 Thread Leandro Dorileo
On Fri, Mar 21, 2014 at 07:43:44AM +0100, Peter Lieven wrote: > On 21.03.2014 01:13, Leandro Dorileo wrote: > >Do the directly migration from QemuOptionParameter to QemuOpts on > >iscsi block driver. > > > >Signed-off-by: Leandro Dorileo >

Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts

2014-03-21 Thread Leandro Dorileo
On Fri, Mar 21, 2014 at 06:09:22PM +0800, Chunyan Liu wrote: > 2014-03-21 8:07 GMT+08:00 Leandro Dorileo : > > > Hi Chunyan, > > > > On Mon, Mar 10, 2014 at 03:31:36PM +0800, Chunyan Liu wrote: > > > This patch series is to replace QEMUOptionParameter with Qem

Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts

2014-03-21 Thread Leandro Dorileo
Hi Kevin, On Fri, Mar 21, 2014 at 11:34:53AM +0100, Kevin Wolf wrote: > Am 21.03.2014 um 01:07 hat Leandro Dorileo geschrieben: > > Hi Chunyan, > > > > On Mon, Mar 10, 2014 at 03:31:36PM +0800, Chunyan Liu wrote: > > > This patch series is to replace QEMUOpt

[Qemu-devel] [PATCH 17/26] rbd: migrate rbd driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on rbd block driver. Signed-off-by: Leandro Dorileo --- block/rbd.c | 60 +--- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index

[Qemu-devel] [PATCH 06/26] block: migrate block later QemuOptionParameter

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on block layer. Signed-off-by: Leandro Dorileo --- block.c | 133 -- include/block/block.h | 7 ++- include/block/block_int.h | 8 ++- 3 files changed, 86

[Qemu-devel] [PATCH 19/26] ssh: migrate ssh driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on ssh block driver. Signed-off-by: Leandro Dorileo --- block/ssh.c | 29 + 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index aa63c9d..b55c518 100644 --- a

[Qemu-devel] [PATCH 20/26] vdi: migrate vdi driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on vdi block driver. Signed-off-by: Leandro Dorileo --- block/vdi.c | 73 - 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index

[Qemu-devel] [PATCH 11/26] qcow: migrate qcow driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on qcow block driver. Signed-off-by: Leandro Dorileo --- block/qcow.c | 59 +-- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/block/qcow.c b/block/qcow.c

[Qemu-devel] [PATCH 01/26] qapi: output def_value_str when query command line options

2014-03-20 Thread Leandro Dorileo
From: Chunyan Liu Change qapi interfaces to output the newly added def_value_str when querying command line options. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- qapi-schema.json | 6 +- qmp-commands.hx| 2 ++ util/qemu-config.c | 4 3 files changed, 11 insertions

[Qemu-devel] [PATCH 18/26] sheepdog: migrate sheepdog driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on sheepdog block driver. Signed-off-by: Leandro Dorileo --- block/sheepdog.c | 104 --- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/block/sheepdog.c b/block

[Qemu-devel] [PATCH 00/26] QemuOptionParameter -> QemuOpts migration

2014-03-20 Thread Leandro Dorileo
unyan's authorship. -- Dorileo Chunyan Liu (3): qapi: output def_value_str when query command line options add def_value_str to QemuOptDesc QemuOpt: introduce qemu_opts_append() Leandro Dorileo (23): QemuOpt: improve default value QemuOpt: add qemu_opt_print_help() block: migrate block la

[Qemu-devel] [PATCH 24/26] vvfat: migrate vvfat driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on vvfat block driver. Signed-off-by: Leandro Dorileo --- block/vvfat.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index f966ea5..7aefba3 100644

[Qemu-devel] [PATCH 22/26] vmdk: migrate vmdk driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on vmdk block driver. Signed-off-by: Leandro Dorileo --- block/vmdk.c | 105 ++- 1 file changed, 53 insertions(+), 52 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c

[Qemu-devel] [PATCH 16/26] raw_bsd: migrate raw_bsd driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on raw_bsd block driver. Signed-off-by: Leandro Dorileo --- block/raw_bsd.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index 01ea692..5090b4e 100644

[Qemu-devel] [PATCH 15/26] raw-win32: migrate cow driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on raw-win32 block driver. Signed-off-by: Leandro Dorileo --- block/raw-win32.c | 29 + 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/block/raw-win32.c b/block/raw-win32.c index 48cb2c2

[Qemu-devel] [PATCH 26/26] qemu-img: migrate QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on qemu-img. Signed-off-by: Leandro Dorileo --- qemu-img.c | 166 +++-- 1 file changed, 95 insertions(+), 71 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 2e40cc1

[Qemu-devel] [PATCH 12/26] qcow2: migrate qcow2 driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on qcow2 block driver. Signed-off-by: Leandro Dorileo --- block/qcow2.c | 263 -- 1 file changed, 128 insertions(+), 135 deletions(-) diff --git a/block/qcow2.c b/block/qcow2

[Qemu-devel] [PATCH 21/26] vhdx: migrate vhdx driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on vhdx block driver. Signed-off-by: Leandro Dorileo --- block/vhdx.c | 88 1 file changed, 41 insertions(+), 47 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c

[Qemu-devel] [PATCH 10/26] nfs: migrate nfs driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on nfs block driver. Signed-off-by: Leandro Dorileo --- block/nfs.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 98aa363..c01f109 100644 --- a/block/nfs.c +++ b

[Qemu-devel] [PATCH 09/26] iscsi: migrate iscsi driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on iscsi block driver. Signed-off-by: Leandro Dorileo --- block/iscsi.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index b490e98..85252e7

[Qemu-devel] [PATCH 14/26] raw-posix: migrate raw-posix driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on raw-posix block driver. Signed-off-by: Leandro Dorileo --- block/raw-posix.c | 50 +++--- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/block/raw-posix.c b/block/raw

[Qemu-devel] [PATCH 13/26] qed: migrate qed driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on qed block driver. Signed-off-by: Leandro Dorileo --- block/qed.c | 79 +++-- 1 file changed, 35 insertions(+), 44 deletions(-) diff --git a/block/qed.c b/block/qed.c index

[Qemu-devel] [PATCH 07/26] cow: migrate cow driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on cow block driver. Signed-off-by: Leandro Dorileo --- block/cow.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/block/cow.c b/block/cow.c index 30deb88..811f7f7

[Qemu-devel] [PATCH 08/26] gluster: migrate gluster driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on gluster block driver. Signed-off-by: Leandro Dorileo --- block/gluster.c | 68 +++-- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/block/gluster.c b/block

[Qemu-devel] [PATCH 05/26] QemuOpt: add qemu_opt_print_help()

2014-03-20 Thread Leandro Dorileo
Analogous to print_option_help(QEMUOptionParameter *list) this function displays the available key and help for each described QemuOptDesc in QemuOptList. Signed-off-by: Leandro Dorileo --- include/qemu/option.h | 1 + util/qemu-option.c| 12 2 files changed, 13 insertions

[Qemu-devel] [PATCH 25/26] QemuOpt: get rid of QEMUOptionParameter

2014-03-20 Thread Leandro Dorileo
Finally remove all the remaining QEMUOptionParameter bits. Signed-off-by: Leandro Dorileo --- include/qemu/option.h | 40 --- util/qemu-option.c| 296 -- 2 files changed, 336 deletions(-) diff --git a/include/qemu/option.h b/include/qemu

[Qemu-devel] [PATCH 23/26] vpc: migrate vpc driver QemuOptionParameter usage

2014-03-20 Thread Leandro Dorileo
Do the directly migration from QemuOptionParameter to QemuOpts on vpc block driver. Signed-off-by: Leandro Dorileo --- block/vpc.c | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 82bf248

[Qemu-devel] [PATCH 03/26] QemuOpt: improve default value

2014-03-20 Thread Leandro Dorileo
Use a pointer to a structure holding the primitive types and avoid parsing the default value representation. Signed-off-by: Leandro Dorileo --- include/qemu/option.h | 20 +++- util/qemu-config.c| 4 ++-- util/qemu-option.c| 45

[Qemu-devel] [PATCH 04/26] QemuOpt: introduce qemu_opts_append()

2014-03-20 Thread Leandro Dorileo
From: Chunyan Liu The qemu_opts_append() function is intended to merge to different QemuOptsList's. The resulting list must be freed by its user. Signed-off-by: Chunyan Liu Signed-off-by: Leandro Dorileo --- include/qemu/option.h | 1 + util/qemu-option.c

[Qemu-devel] [PATCH 02/26] add def_value_str to QemuOptDesc

2014-03-20 Thread Leandro Dorileo
From: Chunyan Liu Add def_value_str (default value) to QemuOptDesc, to replace function of the default value in QEMUOptionParameter. And improved related functions. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- include/qemu/option.h | 3 +- util/qemu-option.c| 84 +++

Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts

2014-03-20 Thread Leandro Dorileo
. I'm sending the job's resulting series to the mailing list so I can show you what I mean and have some more room for discussion. It doesn't mean I want to overlap you work, I just needed to have a little more input on that. Regards -- Leandro Dorileo

Re: [Qemu-devel] How to understand the coroutine context?

2014-03-18 Thread Leandro Dorileo
eenend.org.uk/~sgtatham/coroutines.html [2] - http://tia.mat.br/blog/html/2012/09/29/asynchronous_i_o_in_c_with_coroutines.html Regards... -- Leandro Dorileo

[Qemu-devel] [PATCH v2] QemuOpt: add unit tests

2014-03-17 Thread Leandro Dorileo
Cover basic aspects and API usage for QemuOpt. The current implementation covers the API's planned to be changed by Chunyan Liu in his QEMUOptionParameter replacement/cleanup job. Other APIs should be covered in future improvements. Signed-off-by: Leandro Dorileo Changes: v2: +

Re: [Qemu-devel] [PATCH v22 03/25] improve some functions in qemu-option.c

2014-03-17 Thread Leandro Dorileo
Hi, On Mon, Mar 10, 2014 at 03:31:39PM +0800, Chunyan Liu wrote: > Improve opt_get and opt_set group of functions. For opt_get, check and handle > NULL input; for opt_set, when set to an existing option, rewrite the option > with new value. > > Signed-off-by: Dong Xu Wang > Signed-off-by: Chunya

Re: [Qemu-devel] [PATCH v22 25/25] cleanup QEMUOptionParameter

2014-03-17 Thread Leandro Dorileo
Hi, On Mon, Mar 17, 2014 at 07:29:29PM +, Leandro Dorileo wrote: > Hi, > > On Mon, Mar 10, 2014 at 03:32:01PM +0800, Chunyan Liu wrote: > > Now all places using QEMUOptionParameter could use QemuOpts too, remove > > QEMUOptionParameter related code. > > >

Re: [Qemu-devel] [PATCH v22 05/25] add some QemuOpts functions for replace work

2014-03-17 Thread Leandro Dorileo
Hi, On Mon, Mar 10, 2014 at 03:31:41PM +0800, Chunyan Liu wrote: > Add some qemu_opt functions to replace the same functionality of > QEMUOptionParameter handling. > > Signed-off-by: Dong Xu Wang > Signed-off-by: Chunyan Liu > --- > include/qemu/option.h | 9 +++ > util/qemu-option.c| 18

Re: [Qemu-devel] [PATCH v22 25/25] cleanup QEMUOptionParameter

2014-03-17 Thread Leandro Dorileo
2 wrong assertions). I'll dig it a little deeper - when I find some time to - and comment in the proper patches. Regards... -- Leandro Dorileo

Re: [Qemu-devel] [PATCH] QemuOpt: add unit tests

2014-03-17 Thread Leandro Dorileo
On Mon, Mar 17, 2014 at 10:16:12AM -0600, Eric Blake wrote: > On 03/16/2014 03:18 PM, Leandro Dorileo wrote: > > Cover basic aspects and API usage for QemuOpt. The current implementation > > covers the API's planed to be changed by Chunyan Liu in his > > QEMUOptionParam

Re: [Qemu-devel] [PATCH RFC 0/2] qemu-arg: general purpose argument parser

2014-03-16 Thread Leandro Dorileo
Hi Erick, On Tue, Mar 11, 2014 at 09:22:54AM -0600, Eric Blake wrote: > On 03/11/2014 08:09 AM, Leandro Dorileo wrote: > > Hi Kevin, > > > > On Tue, Mar 11, 2014 at 12:06:16PM +0100, Kevin Wolf wrote: > >> Am 08.03.2014 um 19:47 hat Leandro Dorileo geschrieben

Re: [Qemu-devel] [PATCH v22 03/25] improve some functions in qemu-option.c

2014-03-16 Thread Leandro Dorileo
Hi Chunyan, On Tue, Mar 11, 2014 at 09:00:04PM +, Leandro Dorileo wrote: > Hi, > > On Tue, Mar 11, 2014 at 03:26:51PM +0800, Chunyan Liu wrote: > > 2014-03-11 5:21 GMT+08:00 Eric Blake : > > > > > On 03/10/2014 02:29 PM, Eric Blake wrote: > > > >

[Qemu-devel] [PATCH] QemuOpt: add unit tests

2014-03-16 Thread Leandro Dorileo
Cover basic aspects and API usage for QemuOpt. The current implementation covers the API's planed to be changed by Chunyan Liu in his QEMUOptionParameter replacement/cleanup job. Other APIs should be covered in future improvements. Signed-off-by: Leandro Dorileo --- tests/Mak

Re: [Qemu-devel] [PATCH v22 03/25] improve some functions in qemu-option.c

2014-03-11 Thread Leandro Dorileo
e' type. So the last version silently won, which was not the > > behavior I had predicted. > > > > Post-patch, I get a compilation error (so how did you test your patch?): > > > > Mostly tested ./qemu-img commands where QEMUOptionParameter is used. > I really didn't think of test QemuOpts fully, and about the test suite, I > have no full > knowledge about how many things need to be tested, how many things need to > be > covered? The testsuite should test the QemuOpts implementation, not the current users. Regards... -- Leandro Dorileo

Re: [Qemu-devel] [PATCH RFC 0/2] qemu-arg: general purpose argument parser

2014-03-11 Thread Leandro Dorileo
Hi Kevin, On Tue, Mar 11, 2014 at 12:06:16PM +0100, Kevin Wolf wrote: > Am 08.03.2014 um 19:47 hat Leandro Dorileo geschrieben: > > The following patchset introduces a general purpose argument parser and > > migrates > > qemu-img to make use of it. qemu-img is just the fi

Re: [Qemu-devel] [PATCH RFC 0/2] qemu-arg: general purpose argument parser

2014-03-09 Thread Leandro Dorileo
Hi Andreas, On Sun, Mar 09, 2014 at 05:32:17PM +0100, Andreas Färber wrote: > Am 08.03.2014 19:47, schrieb Leandro Dorileo: > > The following patchset introduces a general purpose argument parser and > > migrates > > qemu-img to make use of it. qemu-img is just the fi

Re: [Qemu-devel] [PATCH RFC 2/2] qemu-img: migrate to use qemu-arg

2014-03-09 Thread Leandro Dorileo
On Sun, Mar 09, 2014 at 01:03:12PM +, Peter Maydell wrote: > On 9 March 2014 12:37, Leandro Dorileo wrote: > > Hi Paolo, > > > > On Sun, Mar 09, 2014 at 08:30:28AM +0100, Paolo Bonzini wrote: > >> Il 08/03/2014 19:47, Leandro Dorileo ha scritto: > >>

Re: [Qemu-devel] [PATCH RFC 2/2] qemu-img: migrate to use qemu-arg

2014-03-09 Thread Leandro Dorileo
Hi Paolo, On Sun, Mar 09, 2014 at 08:30:28AM +0100, Paolo Bonzini wrote: > Il 08/03/2014 19:47, Leandro Dorileo ha scritto: > >Remove the arg parsing implementations using getopt and use qemu-arg. > >Also remove the qemu-img-cmds.hx since it's now generated on building time,

Re: [Qemu-devel] [PATCH RFC 0/2] qemu-arg: general purpose argument parser

2014-03-08 Thread Leandro Dorileo
Hi Peter, On Sat, Mar 08, 2014 at 06:55:50PM +, Peter Maydell wrote: > On 8 March 2014 18:47, Leandro Dorileo wrote: > > The following patchset introduces a general purpose argument parser and > > migrates > > qemu-img to make use of it. qemu-img is just the first user

[Qemu-devel] [PATCH RFC 1/2] qemu-arg: introduce a general purpose argument parser

2014-03-08 Thread Leandro Dorileo
nd parsing decorated arguments ("--argument value" and "--argument=value" are valid) Signed-off-by: Leandro Dorileo --- include/qemu/qemu-arg.h | 287 util/Makefile.objs | 1 + util/qemu-arg.c | 887 ++

[Qemu-devel] [PATCH RFC 0/2] qemu-arg: general purpose argument parser

2014-03-08 Thread Leandro Dorileo
The following patchset introduces a general purpose argument parser and migrates qemu-img to make use of it. qemu-img is just the first user of it, if we see a good feedback here I move forward and migrate all the other possible users. Leandro Dorileo (2): qemu-arg: introduce a general purpose

  1   2   >