mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
char: replace qemu_chr_claim/release with qemu_chr_fe_init/deinit
Now that all front end use qemu_chr_fe_init(), we can move chardev claiming in init(), and add a function deinit() to release the chardev and cleanup handlers. The qemu_chr_fe_claim_no_fail() for property are gone, since the property will raise an error instead. In other cases, where there is already an error path, an error is raised instead. Finally, other cases are handled by &error_abort in qemu_chr_fe_init(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022095318.17775-19-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
5d300164d0
commit
c39860e6dc
@@ -582,9 +582,7 @@ static void monitor_data_init(Monitor *mon)
|
||||
|
||||
static void monitor_data_destroy(Monitor *mon)
|
||||
{
|
||||
if (mon->chr.chr) {
|
||||
qemu_chr_fe_set_handlers(&mon->chr, NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
qemu_chr_fe_deinit(&mon->chr);
|
||||
if (monitor_is_qmp(mon)) {
|
||||
json_message_parser_destroy(&mon->qmp.parser);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user