On 02.11.25 14:37, Marc-André Lureau wrote:
Hi

On Fri, Oct 31, 2025 at 7:59 PM Vladimir Sementsov-Ogievskiy <[email protected] 
<mailto:[email protected]>> wrote:

    We'll need a possibility to postpone connect step to later point in
    time to implement backend-transfer migration feature for vhost-user-blk
    in further commits. Let's start with new char interface for backends.

    .init() takes QAPI parameters and should parse them, called early

    .connect() should actually establish a connection, and postponed to
    the point of attaching to frontend. Called at later point, either
    at time of attaching frontend, or from qemu_chr_wait_connected().

    Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected] 
<mailto:[email protected]>>
    Reviewed-by: Marc-André Lureau <[email protected] 
<mailto:[email protected]>>
    ---
      chardev/char-fe.c      |  4 ++++
      chardev/char.c         | 39 +++++++++++++++++++++++++++++++++++++--
      include/chardev/char.h | 30 +++++++++++++++++++++++++++++-
      3 files changed, 70 insertions(+), 3 deletions(-)

    diff --git a/chardev/char-fe.c b/chardev/char-fe.c
    index 34b83fc1c4..c67b4d640f 100644
    --- a/chardev/char-fe.c
    +++ b/chardev/char-fe.c
    @@ -193,6 +193,10 @@ bool qemu_chr_fe_init(CharFrontend *c, Chardev *s, 
Error **errp)
      {
          unsigned int tag = 0;

    +    if (!qemu_chr_connect(s, errp)) {
    +        return false;
    +    }


this should be after "if (s)" condition.

It is moved in a later patch, but better do it now.

Oh, right, will do.

--
Best regards,
Vladimir

Reply via email to