qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [RFC 0/4] util: qmessage_context followup
Date: Wed, 10 Sep 2025 19:05:37 +0100	[thread overview]
Message-ID: <aMG98W3y9jpUvJfB@redhat.com> (raw)
In-Reply-To: <20250902103010.309094-1-richard.henderson@linaro.org>

On Tue, Sep 02, 2025 at 12:30:06PM +0200, Richard Henderson wrote:
> Hi Daniel,
> 
> I'm still not keen on qmessage_context allocating a string.
> 
> If we *did* allocate a string, it should be a GString so that we can
> easily append to that.  The only benefit I see from this is that we
> would collect all of the output and it would reach stderr atomically.
> 
> However, I think it's better to not collect the message and just
> output the pieces.  Something like the following.  The names are
> horrible and I didn't document the patches well.

I've posted a v3 of my series which incorporates the conceptual
idea you show here. I managed to simplify it somewhat as I came
to realize the qmessage_context code never needs to write to
anything other than a "FILE *", because we always skip the context
when writing to HMP. IOW, we could simply use fprintf() directly
throughout

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



      parent reply	other threads:[~2025-09-10 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 10:30 [RFC 0/4] util: qmessage_context followup Richard Henderson
2025-09-02 10:30 ` [RFC 1/4] util: Introduce LogOutput Richard Henderson
2025-09-02 10:30 ` [RFC 2/4] util: Drop QMESSAGE_CONTEXT_SKIP_MONITOR Richard Henderson
2025-09-02 10:30 ` [RFC 3/4] util/message: Use LogOutput Richard Henderson
2025-09-02 10:30 ` [RFC 4/4] util/error-report: Use LogOutput in vreport Richard Henderson
2025-09-02 16:47 ` [RFC 0/4] util: qmessage_context followup Daniel P. Berrangé
2025-09-10 18:05 ` Daniel P. Berrangé [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aMG98W3y9jpUvJfB@redhat.com \
    --to=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).