From b6b71cb5c674a97a4cd935349ce8a2764f720af4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 17 Apr 2019 21:17:56 +0200 Subject: memory: Clean up how mtree_info() prints mtree_info() takes an fprintf()-like callback and a FILE * to pass to it, and so do its helper functions. Passing around callback and argument is rather tiresome. Its only caller hmp_info_mtree() passes monitor_printf() cast to fprintf_function and the current monitor cast to FILE *. The type-punning is technically undefined behaviour, but works in practice. Clean up: drop the callback, and call qemu_printf() instead. Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert Message-Id: <20190417191805.28198-9-armbru@redhat.com> --- include/exec/memory-internal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/exec/memory-internal.h') diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index bb08fa4d2f..d1a9dd1ec8 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -45,8 +45,7 @@ AddressSpaceDispatch *address_space_dispatch_new(FlatView *fv); void address_space_dispatch_compact(AddressSpaceDispatch *d); void address_space_dispatch_free(AddressSpaceDispatch *d); -void mtree_print_dispatch(fprintf_function mon, void *f, - struct AddressSpaceDispatch *d, +void mtree_print_dispatch(struct AddressSpaceDispatch *d, MemoryRegion *root); struct page_collection; -- cgit v1.2.3-55-g7522