[pseudo][PATCH v2 11/23] pseudo: Change pseudo_diag() name to pseudo_log()

Mark Hatle <[email protected]> Fri, 3 Jul 2026 13:40:43 -0500
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <1783104055-19005-12-git-send-email-mark.hatle@kernel.crashing.org>
From: Dmitry Sakhonchik <[email protected]>

Implements [YOCTO #12141]

Signed-off-by: Dmitry Sakhonchik <[email protected]>
Signed-off-by: Mark Hatle <[email protected]>
---
 pseudo.h      | 14 +++++++-------
 pseudo_util.c |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/pseudo.h b/pseudo.h
index d214ba2..92ae71e 100644
--- a/pseudo.h
+++ b/pseudo.h
@@ -34,7 +34,7 @@ extern unsigned long pseudo_util_severity_flags;
 extern int pseudo_util_debug_fd;
 extern int pseudo_disabled;
 extern int pseudo_allow_fsync;
-extern int pseudo_diag(char *, ...) __attribute__ ((format (printf, 1, 2)));
+extern int pseudo_log(char *, ...) __attribute__ ((format (printf, 1, 2)));
 extern int pseudo_evlog_internal(char *, ...) __attribute__ ((format (printf, 1, 2)));
 #define pseudo_evlog(x, ...) do { \
 	if (pseudo_util_evlog_flags & (x)) { pseudo_evlog_internal(__VA_ARGS__); } \
@@ -42,27 +42,27 @@ extern int pseudo_evlog_internal(char *, ...) __attribute__ ((format (printf, 1,
 extern void pseudo_evlog_dump(void);
 #ifndef NDEBUG
 #define pseudo_critical(fmt, ...) do { \
-	pseudo_diag("CRITICAL: " fmt, ##__VA_ARGS__); \
+	pseudo_log("CRITICAL: " fmt, ##__VA_ARGS__); \
 	abort(); \
 } while (0)
 #define pseudo_error(fmt, ...) do { \
-	pseudo_diag("ERROR: " fmt, ##__VA_ARGS__); \
+	pseudo_log("ERROR: " fmt, ##__VA_ARGS__); \
 } while (0)
 #define pseudo_warning(fmt, ...) do { \
 	if (pseudo_util_severity_flags & SEVERITYF_WARN) { \
-		pseudo_diag("WARNING: " fmt, ##__VA_ARGS__); \
+		pseudo_log("WARNING: " fmt, ##__VA_ARGS__); \
 	} \
 } while (0)
 #define pseudo_info(fmt, ...) do { \
 	if (pseudo_util_severity_flags & SEVERITYF_INFO) { \
-		pseudo_diag("INFO: " fmt, ##__VA_ARGS__); \
+		pseudo_log("INFO: " fmt, ##__VA_ARGS__); \
 	} \
 } while (0)
 #define pseudo_debug(x, ...) do { \
 	if ((x) & PDBGF_VERBOSE) { \
-		if ((pseudo_util_debug_flags & PDBGF_VERBOSE) && (pseudo_util_debug_flags & ((x) & ~PDBGF_VERBOSE))) { pseudo_diag(__VA_ARGS__); } \
+		if ((pseudo_util_debug_flags & PDBGF_VERBOSE) && (pseudo_util_debug_flags & ((x) & ~PDBGF_VERBOSE))) { pseudo_log(__VA_ARGS__); } \
 	} else { \
-		if ((pseudo_util_debug_flags & (x)) || ((x) == 0)) { pseudo_diag(__VA_ARGS__); } \
+		if ((pseudo_util_debug_flags & (x)) || ((x) == 0)) { pseudo_log(__VA_ARGS__); } \
 	} \
 } while (0) 
 #define pseudo_debug_call(x, fn, ...) do { \
diff --git a/pseudo_util.c b/pseudo_util.c
index dbd979e..893a25b 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -528,7 +528,7 @@ pseudo_debug_clear(char *s) {
 }
 
 int
-pseudo_diag(char *fmt, ...) {
+pseudo_log(char *fmt, ...) {
 	va_list ap;
 	char debuff[8192];
 	int len;
-- 
1.8.3.1