The list is now empty, the chardev cleanup is taken care of by the unref
of the root container.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
/***********************************************************/
/* character device */
-static QTAILQ_HEAD(ChardevHead, Chardev) chardevs =
- QTAILQ_HEAD_INITIALIZER(chardevs);
-
static Object *get_chardevs_root(void)
{
return container_get(object_get_root(), "/chardevs");
{
Chardev *chr = CHARDEV(obj);
- if (QTAILQ_IN_USE(chr, next)) {
- QTAILQ_REMOVE(&chardevs, chr, next);
- }
if (chr->be) {
chr->be->chr = NULL;
}
int be_open;
guint fd_in_tag;
DECLARE_BITMAP(features, QEMU_CHAR_FEATURE_LAST);
- QTAILQ_ENTRY(Chardev) next;
};
/**