From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8kkM-0005I8-RW for qemu-devel@nongnu.org; Wed, 18 Apr 2018 06:55:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8kkJ-00037I-Ov for qemu-devel@nongnu.org; Wed, 18 Apr 2018 06:55:30 -0400 References: <20180416181844.7851-1-marcandre.lureau@redhat.com> <20180416184406.GC14488@redhat.com> <19b7bccd-2282-5c94-fe7c-68f72ccbaba7@amsat.org> From: Paolo Bonzini Message-ID: <860de622-d4cc-d1bf-ae27-e4d70d5d22f0@redhat.com> Date: Wed, 18 Apr 2018 12:55:16 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] mux: fix ctrl-a b again List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Cc: Peter Maydell , "=?UTF-8?Q?Daniel_P._Berrang=c3=a9?=" , qemu-stable , QEMU Developers On 18/04/2018 12:36, Marc-Andr=C3=A9 Lureau wrote: >=20 > + if (chr =3D=3D NULL || chr->be) { > + name =3D g_strdup_printf("discarding-serial%d", i); > + chr =3D qemu_chr_new(name, "null"); > + } else { > + name =3D g_strdup_printf("serial%d", i); > + } >=20 > 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