|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v19 07/11] qapi: make string output visitor parse int list |
Date: | Tue, 04 Mar 2014 10:33:18 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Il 04/03/2014 10:23, Hu Tao ha scritto:
>> >+ } else { > >+ out = g_strdup_printf("%lld-%lld", > >+ (long long) sov->range_start.s, > >+ (long long) sov->range_end.s); > >+ } > >+ }> > This looks wrong. You do not insert any separator, and you do not > handle things like "0-3,8-11". You probably should use a GString > instead of string_output_set.Right. We should also handle "0-3,8-11"-like lists in string input visitor and opts visitor.
Ok, no big deal; let's do one thing at a time.Regarding string input visitor, I believe we can avoid the code duplication by:
(1) using Qmp input/output visitors in query-memdev (2) using OptsVisitor in -objectThe string output visitor becomes more important than the string input visitor, but it is only needed for HMP so it is not urgent.
We can then work on making OptsVisitor use the string input visitor internally.
But I'm already applying patches 1-5, 8, 9, 10 (the latter with the above changes) to the numa tree.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |