On Mon, Nov 30, 2015 at 10:12:10AM +0100, Paolo Bonzini wrote: > > > On 30/11/2015 04:47, Peter Xu wrote: > > > > I met one problem when trying to add a new public function in dump.h > > named "dump_state_get_global" and using it in hmp.c. > > Don't do that. :) > > hmp.c functions should in general use the QMP commands as the base. In > your case, hmp_info_dump should call qmp_query_dump.
Hi, Paolo, That becomes a problem only if I do not have "percentage" (or written/total) in QMP queries, which is suggested in the previous review message: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg06088.html """ The percentage is not necessary as part of the QMP return value. You can compute it in hmp_info_dump however and print it to HMP only. """ So from what I understand from your reply, I could include the percentage value into "query-dump", right? :) Actually, I think it would be cooler if we could have them in both QMP/HMP messages (maybe I would better prefer percentage comparing to written/total bytes, since it is more directly human readable). Thanks! Peter > > Paolo