[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 10/11] Dump: add hmp command "info dump"
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v6 10/11] Dump: add hmp command "info dump" |
Date: |
Tue, 16 Feb 2016 15:18:03 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Feb 16, 2016 at 02:46:15PM +0800, Fam Zheng wrote:
> On Wed, 12/09 10:42, Peter Xu wrote:
> > +
> > +void hmp_info_dump(Monitor *mon, const QDict *qdict)
> > +{
> > + DumpQueryResult *result = qmp_query_dump(NULL);
>
> If something goes wrong, it is probably better to pass in local_err to
> qmp_query_dump and print the error info instead of assuming result's fields
> are
> all valid and trying to interpret them.
>
> Fam
This is because qmp_query_dump() will never fail, and it's not using
errp. Will assert "result" too before use.
Thanks.
Peter