All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Eric Blake" <eblake@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Zhao Liu" <zhao1.liu@intel.com>
Subject: Re: [PATCH v4 1/2] hw/uefi: add "info firmware-log" + "query-firmware-log" monitor commands
Date: Wed, 15 Oct 2025 09:21:32 +0200	[thread overview]
Message-ID: <87h5w0hbpf.fsf@pond.sub.org> (raw)
In-Reply-To: <vhlcfuavvamzugm5okig6x5nrrqodkim3kqacr3h26xtcjadyv@zfexdtgwdfzl> (Gerd Hoffmann's message of "Wed, 15 Oct 2025 08:36:52 +0200")

Gerd Hoffmann <kraxel@redhat.com> writes:

>> > +/* ----------------------------------------------------------------------- */
>> > +/* qemu monitor command                                                    */
>> > +
>> > +typedef struct {
>> > +    uint64_t             magic1;
>> > +    uint64_t             magic2;
>> > +} MEM_DEBUG_LOG_MAGIC;
>> 
>> You changed capitalization.  Intentional?
>
> Reduce the qemu / edk2 code style mix a bit ...

Up to you, but I'd use Magic with MEM_DEBUG_LOG_MAGIC, and magic with
something like MemDebugLogMagic.

>> > +    if (log->log) {
>> > +        g_autofree gchar *esc = NULL;
>> > +        g_autofree gchar *out = NULL;
>> > +        size_t outlen;
>> > +
>> > +        out = (gchar *)qbase64_decode(log->log, -1, &outlen, &errp);
>> > +        if (errp)  {
>> 
>> How can this happen?
>
> In theory it should never happen.

Pass &error_abort then.  Avoids untestable error path.

Actually, just use g_base64_decode().



  reply	other threads:[~2025-10-15  7:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13 10:49 [PATCH v4 0/2] hw/uefi: add support for receiving the firmware log via monitor Gerd Hoffmann
2025-10-13 10:49 ` [PATCH v4 1/2] hw/uefi: add "info firmware-log" + "query-firmware-log" monitor commands Gerd Hoffmann
2025-10-14  8:56   ` Daniel P. Berrangé
2025-10-15  6:33     ` Gerd Hoffmann
2025-10-15  7:41       ` Markus Armbruster
2025-10-15  8:08         ` Gerd Hoffmann
2025-10-15  8:17         ` Daniel P. Berrangé
2025-10-14 12:03   ` Markus Armbruster
2025-10-15  6:36     ` Gerd Hoffmann
2025-10-15  7:21       ` Markus Armbruster [this message]
2025-10-13 10:49 ` [PATCH v4 2/2] hw/uefi/ovmf-log: add maxsize parameter Gerd Hoffmann
2025-10-14  8:57   ` Daniel P. Berrangé
2025-10-14 12:48   ` Markus Armbruster

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=87h5w0hbpf.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=farosas@suse.de \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.