All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Markus Armbruster" <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: [PATCH 2/6] util: add helper to query if a location is set
Date: Thu,  3 Dec 2026 17:25:39 +0000	[thread overview]
Message-ID: <20261203172543.676434-3-berrange@redhat.com> (raw)
In-Reply-To: <20261203172543.676434-1-berrange@redhat.com>

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 include/qemu/location.h | 1 +
 util/location.c         | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/include/qemu/location.h b/include/qemu/location.h
index c900ef9b979..3f5391145a4 100644
--- a/include/qemu/location.h
+++ b/include/qemu/location.h
@@ -20,5 +20,6 @@ void loc_set_none(void);
 void loc_set_cmdline(char **argv, int idx, int cnt);
 void loc_set_file(const char *fname, int lno);
 char *loc_as_string(void);
+bool loc_is_none(void);
 
 #endif /* QEMU_LOCATION_H */
diff --git a/util/location.c b/util/location.c
index 9693787039e..d2bfbb31800 100644
--- a/util/location.c
+++ b/util/location.c
@@ -129,3 +129,9 @@ char *loc_as_string(void)
 
     return g_string_free(str, FALSE);
 }
+
+
+bool loc_is_none(void)
+{
+    return cur_loc->kind == LOC_NONE;
+}
-- 
2.56.1



  parent reply	other threads:[~2026-12-03 17:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 17:25 [PATCH 0/6] util: configurable / flexible error/log message output format Daniel P. Berrangé
2026-12-03 17:25 ` [PATCH 1/6] util: pull Location struct and APIs into location.{c,h} Daniel P. Berrangé
2026-12-03 20:51   ` Eric Blake
2026-12-03 17:25 ` Daniel P. Berrangé [this message]
2026-12-03 20:51   ` [PATCH 2/6] util: add helper to query if a location is set Eric Blake
2026-12-03 17:25 ` [PATCH 3/6] util: introduce a configurable message format template Daniel P. Berrangé
2026-12-03 21:44   ` Eric Blake
2026-12-04  9:22     ` Daniel P. Berrangé
2026-12-04  0:32   ` Dr. David Alan Gilbert
2026-12-03 17:25 ` [PATCH 4/6] util: convert log code to support QMessageFormat Daniel P. Berrangé
2026-12-03 21:52   ` Eric Blake
2026-12-03 17:25 ` [PATCH 5/6] util: convert error report code to use QMessageFormat Daniel P. Berrangé
2026-12-03 21:55   ` Eric Blake
2026-12-03 17:25 ` [PATCH 6/6] util: add '-msg format=FORMATSTR' argument Daniel P. Berrangé
2026-12-03 22:02   ` Eric Blake
2026-12-04  9:23     ` Daniel P. Berrangé

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=20261203172543.676434-3-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 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.