char-win: rename win_chr_init/poll win_chr_serial_init/poll
Those 2 functions are specific to serial chardev, make it more clear. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
6ce8e0eb58
commit
221e659c3f
@ -45,7 +45,7 @@ static void qmp_chardev_open_serial(Chardev *chr,
|
||||
{
|
||||
ChardevHostdev *serial = backend->u.serial.data;
|
||||
|
||||
win_chr_init(chr, serial->device, errp);
|
||||
win_chr_serial_init(chr, serial->device, errp);
|
||||
}
|
||||
|
||||
#elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
|
||||
|
@ -56,7 +56,7 @@ static void win_chr_read(Chardev *chr, DWORD len)
|
||||
}
|
||||
}
|
||||
|
||||
static int win_chr_poll(void *opaque)
|
||||
static int win_chr_serial_poll(void *opaque)
|
||||
{
|
||||
Chardev *chr = CHARDEV(opaque);
|
||||
WinChardev *s = WIN_CHARDEV(opaque);
|
||||
@ -71,7 +71,7 @@ static int win_chr_poll(void *opaque)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int win_chr_init(Chardev *chr, const char *filename, Error **errp)
|
||||
int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp)
|
||||
{
|
||||
WinChardev *s = WIN_CHARDEV(chr);
|
||||
COMMCONFIG comcfg;
|
||||
@ -130,7 +130,7 @@ int win_chr_init(Chardev *chr, const char *filename, Error **errp)
|
||||
error_setg(errp, "Failed ClearCommError");
|
||||
goto fail;
|
||||
}
|
||||
qemu_add_polling_cb(win_chr_poll, chr);
|
||||
qemu_add_polling_cb(win_chr_serial_poll, chr);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
@ -208,7 +208,7 @@ static void char_win_finalize(Object *obj)
|
||||
if (s->fpipe) {
|
||||
qemu_del_polling_cb(win_chr_pipe_poll, chr);
|
||||
} else {
|
||||
qemu_del_polling_cb(win_chr_poll, chr);
|
||||
qemu_del_polling_cb(win_chr_serial_poll, chr);
|
||||
}
|
||||
|
||||
qemu_chr_be_event(chr, CHR_EVENT_CLOSED);
|
||||
|
@ -46,7 +46,7 @@ typedef struct {
|
||||
#define WIN_CHARDEV(obj) OBJECT_CHECK(WinChardev, (obj), TYPE_CHARDEV_WIN)
|
||||
|
||||
void qemu_chr_open_win_file(Chardev *chr, HANDLE fd_out);
|
||||
int win_chr_init(Chardev *chr, const char *filename, Error **errp);
|
||||
int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp);
|
||||
int win_chr_pipe_poll(void *opaque);
|
||||
|
||||
#endif /* CHAR_WIN_H */
|
||||
|
Loading…
Reference in New Issue
Block a user