]> www.infradead.org Git - users/willy/xarray.git/commitdiff
KVM: selftests: aarch64: Use stream when given
authorAndrew Jones <drjones@redhat.com>
Fri, 14 Feb 2020 14:59:15 +0000 (15:59 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 Feb 2020 19:05:19 +0000 (20:05 +0100)
I'm not sure how we ended up using printf instead of fprintf in
virt_dump(). Fix it.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/aarch64/processor.c

index 86036a59a668e09c98861e302416a016b6d1e4a9..f9decadfbe714cc20ad9e43c9f1f9b03d0ff65aa 100644 (file)
@@ -197,7 +197,7 @@ static void pte_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent, uint64_t p
                ptep = addr_gpa2hva(vm, pte);
                if (!*ptep)
                        continue;
-               printf("%*s%s: %lx: %lx at %p\n", indent, "", type[level], pte, *ptep, ptep);
+               fprintf(stream, "%*s%s: %lx: %lx at %p\n", indent, "", type[level], pte, *ptep, ptep);
                pte_dump(stream, vm, indent + 1, pte_addr(vm, *ptep), level + 1);
        }
 #endif
@@ -215,7 +215,7 @@ void virt_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent)
                ptep = addr_gpa2hva(vm, pgd);
                if (!*ptep)
                        continue;
-               printf("%*spgd: %lx: %lx at %p\n", indent, "", pgd, *ptep, ptep);
+               fprintf(stream, "%*spgd: %lx: %lx at %p\n", indent, "", pgd, *ptep, ptep);
                pte_dump(stream, vm, indent + 1, pte_addr(vm, *ptep), level);
        }
 }