On 18/04/2018 12:36, Marc-André Lureau wrote: > > + if (chr == NULL || chr->be) { > + name = g_strdup_printf("discarding-serial%d", i); > + chr = qemu_chr_new(name, "null"); > + } else { > + name = g_strdup_printf("serial%d", i); > + } > > Why do you check if chr->be ? In case of a mux chardev, it may already > have an active frontend (yeah be is CharBackend which is the frontend, > I still can't grasp that either, please Paolo change your mind! ;).
CharBackend is not the frontend, it is *used* by the front-end. It is the qemu_chr_* functions that are named wrong (they're named according to the user rather than the recipient). Paolo