aboutsummaryrefslogtreecommitdiff
path: root/chardev/testdev.c
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2021-08-17 10:56:27 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-09-14 16:52:33 +0400
commit692277f38dcfe6fff47825d14586424f45b4dfd8 (patch)
tree128f27d1e149bc6648ea1c02a0e092039153a26e /chardev/testdev.c
parent2a2d51bc07a58bb6418a07da151acebcc3c530c0 (diff)
downloadqemu-692277f38dcfe6fff47825d14586424f45b4dfd8.zip
qemu-692277f38dcfe6fff47825d14586424f45b4dfd8.tar.gz
qemu-692277f38dcfe6fff47825d14586424f45b4dfd8.tar.bz2
chardev: Propagate error from logfile opening
If a chardev has a logfile the file is opened using qemu_open_old() which does the job, but since @errp is not propagated into qemu_open_internal() we lose much more accurate error and just report "Unable to open logfile $errno". When using plain files, it's probably okay as nothing complex is happening behind the curtains. But the problem becomes more prominent when passing an "/dev/fdset/XXX" path since much more needs to be done. The fix is to use qemu_create() which passes @errp further down. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <f34ee80866e6f591bcb98401dee27682f5543fca.1629190206.git.mprivozn@redhat.com>
Diffstat (limited to 'chardev/testdev.c')
0 files changed, 0 insertions, 0 deletions