aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2021-09-02 09:00:16 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2021-09-07 09:08:24 +0100
commitcb49dfce586367cda313fe9ce92e095f534e8178 (patch)
tree86ac66aa0b39df615ca702183dce73a97481f064 /util
parent5ef1f4ec6fd8cbf0b312acb32be8166ab8b1b24d (diff)
util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report()
Instead of displaying the error on stderr, use error_report() which also report to the monitor. Reviewed-by: Fam Zheng <fam@euphon.net> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-3-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/vfio-helpers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c
index 911115b86e..1d14913629 100644
--- a/util/vfio-helpers.c
+++ b/util/vfio-helpers.c
@@ -660,13 +660,13 @@ static bool qemu_vfio_verify_mappings(QEMUVFIOState *s)
if (QEMU_VFIO_DEBUG) {
for (i = 0; i < s->nr_mappings - 1; ++i) {
if (!(s->mappings[i].host < s->mappings[i + 1].host)) {
- fprintf(stderr, "item %d not sorted!\n", i);
+ error_report("item %d not sorted!", i);
qemu_vfio_dump_mappings(s);
return false;
}
if (!(s->mappings[i].host + s->mappings[i].size <=
s->mappings[i + 1].host)) {
- fprintf(stderr, "item %d overlap with next!\n", i);
+ error_report("item %d overlap with next!", i);
qemu_vfio_dump_mappings(s);
return false;
}