Skip to content

Commit cb49dfc

Browse files
philmdstefanhaRH
authored andcommitted
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 <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Klaus Jensen <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
1 parent 5ef1f4e commit cb49dfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/vfio-helpers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,13 +660,13 @@ static bool qemu_vfio_verify_mappings(QEMUVFIOState *s)
660660
if (QEMU_VFIO_DEBUG) {
661661
for (i = 0; i < s->nr_mappings - 1; ++i) {
662662
if (!(s->mappings[i].host < s->mappings[i + 1].host)) {
663-
fprintf(stderr, "item %d not sorted!\n", i);
663+
error_report("item %d not sorted!", i);
664664
qemu_vfio_dump_mappings(s);
665665
return false;
666666
}
667667
if (!(s->mappings[i].host + s->mappings[i].size <=
668668
s->mappings[i + 1].host)) {
669-
fprintf(stderr, "item %d overlap with next!\n", i);
669+
error_report("item %d overlap with next!", i);
670670
qemu_vfio_dump_mappings(s);
671671
return false;
672672
}

0 commit comments

Comments
 (0)