From: Wei Liu Subject: Re: [PATCH for-4.5 2/2] xl: print out partial configuration in long mode of list command Date: Fri, 14 Nov 2014 10:09:39 +0000 Message-ID: <20141114100939.GB30599@zion.uk.xensource.com> References: <1415811865-19981-1-git-send-email-wei.liu2@citrix.com> <1415811865-19981-3-git-send-email-wei.liu2@citrix.com> <1415959140.21321.21.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1415959140.21321.21.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: ian.jackson@eu.citrix.com, zhigang.x.wang@oracle.com, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, Nov 14, 2014 at 09:59:00AM +0000, Ian Campbell wrote: > On Wed, 2014-11-12 at 17:04 +0000, Wei Liu wrote: > > Unconditionally print out the partial configuration. > > Can you provide an example of what such a configuration looks like? > { "domid": 2, "config": { "c_info": { "name": "s0-raw-vnuma", "uuid": "a8bed4ac-a0fe-4166-8eac-feeb007a2110" }, "b_info": { "sched_params": { }, "type.invalid": { } } } } Libxl still complains because it tries to read some nodes that don't exist, so xl will just print it out on stderr. This is the same behaviour as before though. Wei. > > > > Signed-off-by: Wei Liu > > Cc: Zhigang Wang > > Cc: Ian Campbell > > Cc: Ian Jackson > > --- > > tools/libxl/xl_cmdimpl.c | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > index 3c9f146..396e06c 100644 > > --- a/tools/libxl/xl_cmdimpl.c > > +++ b/tools/libxl/xl_cmdimpl.c > > @@ -3388,7 +3388,7 @@ static void list_domains_details(const libxl_dominfo *info, int nb_domain) > > { > > libxl_domain_config d_config; > > > > - int i, rc; > > + int i; > > > > yajl_gen hand = NULL; > > yajl_gen_status s; > > @@ -3410,9 +3410,7 @@ static void list_domains_details(const libxl_dominfo *info, int nb_domain) > > > > for (i = 0; i < nb_domain; i++) { > > libxl_domain_config_init(&d_config); > > - rc = libxl_retrieve_domain_configuration(ctx, info[i].domid, &d_config); > > - if (rc) > > - continue; > > + libxl_retrieve_domain_configuration(ctx, info[i].domid, &d_config); > > if (default_output_format == OUTPUT_FORMAT_JSON) > > s = printf_info_one_json(hand, info[i].domid, &d_config); > > else >