2014-03-18 3:58 GMT+08:00 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 valu
2014-03-17 5:19 GMT+08:00 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
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
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:
> > >
> > > >> +opt = qemu_opt_find(opts, name);
2014-03-11 5:21 GMT+08:00 Eric Blake :
> On 03/10/2014 02:29 PM, Eric Blake wrote:
>
> >> +opt = qemu_opt_find(opts, name);
> >> +if (opt) {
> >> +g_free((char *)opt->str);
> >
> > ...which means the cast is pointless here.
> >
> > Hmm. This means that you are giving opt_set() the
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:
> >
> > >> +opt = qemu_opt_find(opts, name);
> > >> +if (opt) {
> > >> +g_free((char *)opt->str);
> > >
> > > ...which means th
2014-03-11 5:21 GMT+08:00 Eric Blake :
> On 03/10/2014 02:29 PM, Eric Blake wrote:
>
> >> +opt = qemu_opt_find(opts, name);
> >> +if (opt) {
> >> +g_free((char *)opt->str);
> >
> > ...which means the cast is pointless here.
> >
> > Hmm. This means that you are giving opt_set() the
On 03/10/2014 02:29 PM, Eric Blake wrote:
>> +opt = qemu_opt_find(opts, name);
>> +if (opt) {
>> +g_free((char *)opt->str);
>
> ...which means the cast is pointless here.
>
> Hmm. This means that you are giving opt_set() the behavior of 'last
> version wins', by silently overwri
On 03/10/2014 01:31 AM, 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: Chunyan Liu
> ---
> include
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: Chunyan Liu
---
include/qemu/option_int.h | 4 +--
util/qemu-option.c| 81
10 matches
Mail list logo