char: remove chr_free
Now it uses Object instance_finalize instead. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
7f2fe073f3
commit
8cddc46990
@ -184,13 +184,6 @@ Chardev *qemu_chr_new_noreplay(const char *label, const char *filename);
|
|||||||
*/
|
*/
|
||||||
void qemu_chr_delete(Chardev *chr);
|
void qemu_chr_delete(Chardev *chr);
|
||||||
|
|
||||||
/**
|
|
||||||
* @qemu_chr_free:
|
|
||||||
*
|
|
||||||
* Destroy a character backend.
|
|
||||||
*/
|
|
||||||
void qemu_chr_free(Chardev *chr);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qemu_chr_fe_set_echo:
|
* @qemu_chr_fe_set_echo:
|
||||||
*
|
*
|
||||||
@ -496,7 +489,6 @@ typedef struct ChardevClass {
|
|||||||
int (*set_msgfds)(Chardev *s, int *fds, int num);
|
int (*set_msgfds)(Chardev *s, int *fds, int num);
|
||||||
int (*chr_add_client)(Chardev *chr, int fd);
|
int (*chr_add_client)(Chardev *chr, int fd);
|
||||||
int (*chr_wait_connected)(Chardev *chr, Error **errp);
|
int (*chr_wait_connected)(Chardev *chr, Error **errp);
|
||||||
void (*chr_free)(Chardev *chr);
|
|
||||||
void (*chr_disconnect)(Chardev *chr);
|
void (*chr_disconnect)(Chardev *chr);
|
||||||
void (*chr_accept_input)(Chardev *chr);
|
void (*chr_accept_input)(Chardev *chr);
|
||||||
void (*chr_set_echo)(Chardev *chr, bool echo);
|
void (*chr_set_echo)(Chardev *chr, bool echo);
|
||||||
|
10
qemu-char.c
10
qemu-char.c
@ -4371,18 +4371,10 @@ void qemu_chr_fe_disconnect(CharBackend *be)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void qemu_chr_free(Chardev *chr)
|
|
||||||
{
|
|
||||||
if (CHARDEV_GET_CLASS(chr)->chr_free) {
|
|
||||||
CHARDEV_GET_CLASS(chr)->chr_free(chr);
|
|
||||||
}
|
|
||||||
object_unref(OBJECT(chr));
|
|
||||||
}
|
|
||||||
|
|
||||||
void qemu_chr_delete(Chardev *chr)
|
void qemu_chr_delete(Chardev *chr)
|
||||||
{
|
{
|
||||||
QTAILQ_REMOVE(&chardevs, chr, next);
|
QTAILQ_REMOVE(&chardevs, chr, next);
|
||||||
qemu_chr_free(chr);
|
object_unref(OBJECT(chr));
|
||||||
}
|
}
|
||||||
|
|
||||||
ChardevInfoList *qmp_query_chardev(Error **errp)
|
ChardevInfoList *qmp_query_chardev(Error **errp)
|
||||||
|
Loading…
Reference in New Issue
Block a user