Re: [Qemu-devel] [PATCH 08/25] qapi: support nested structs in OptsVisitor

2015-08-20 Thread Marc-André Lureau
Hi On Thu, Aug 6, 2015 at 8:28 PM, Kővágó, Zoltán wrote: > The current OptsVisitor flattens the whole structure, if there are same > named fields under different paths (like `in' and `out' in `Audiodev'), > the current visitor can't cope with them (for example setting > `frequency=44100' will set

Re: [Qemu-devel] [PATCH 08/25] qapi: support nested structs in OptsVisitor

2015-08-20 Thread Kővágó Zoltán
Hi, 2015-08-20 17:55 keltezéssel, Marc-André Lureau írta: [snip] +static void +sum_strlen(gpointer data, gpointer user_data) +{ +const char *str = data; +size_t *sum_len = user_data; + +if (str) { /* skip NULLs */ +*sum_len += strlen(str) + 1; +} +} + +static void +append

[Qemu-devel] [PATCH 08/25] qapi: support nested structs in OptsVisitor

2015-08-06 Thread Kővágó, Zoltán
The current OptsVisitor flattens the whole structure, if there are same named fields under different paths (like `in' and `out' in `Audiodev'), the current visitor can't cope with them (for example setting `frequency=44100' will set the in's frequency to 44100 and leave out's frequency unspecified)