mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
char: avoid chardevice direct access
frontends should avoid accessing CharDriver struct where possible Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1499342940-56739-6-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7c44a2a9d1
commit
3065070153
24 changed files with 41 additions and 32 deletions
|
@ -163,7 +163,7 @@ static ssize_t write_console_data(SCLPEvent *event, const uint8_t *buf,
|
|||
{
|
||||
SCLPConsole *scon = SCLP_CONSOLE(event);
|
||||
|
||||
if (!qemu_chr_fe_get_driver(&scon->chr)) {
|
||||
if (!qemu_chr_fe_backend_connected(&scon->chr)) {
|
||||
/* If there's no backend, we can just say we consumed all data. */
|
||||
return len;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue