]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: unify code for reporting errors from QEMU log files
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 12 Nov 2015 11:01:07 +0000 (11:01 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 26 Nov 2015 14:30:15 +0000 (14:30 +0000)
commit69b0992178ddea4fae210bb580781ce3b1ecf869
tree6190757aed9ab0aecf14394bd38bf1d9a693f0c9
parent37c0ac267dc824630249bcd0a2fcf93807ea2b19
qemu: unify code for reporting errors from QEMU log files

There are two pretty similar functions qemuProcessReadLog and
qemuProcessReadChildErrors. Both read from the QEMU log file
and try to strip out libvirt messages. The latter then reports
an error, while the former lets the callers report an error.

Re-write qemuProcessReadLog so that it uses a single read
into a dynamically allocated buffer. Then introduce a new
qemuProcessReportLogError that calls qemuProcessReadLog
and reports an error.

Convert all callers to use qemuProcessReportLogError.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_migration.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_process.c
src/qemu/qemu_process.h