diff mbox series

[pseudo,8/8] pseudo: Change pseudo_diag() name to pseudo_log()

Message ID 20260610114610.60776-8-frezidok1@gmail.com
State New
Headers show
Series [pseudo,1/8] pseudo_util: Change pseudo_diag() calls to appropriate logging macros | expand

Commit Message

Dmitry Sakhonchik June 10, 2026, 11:46 a.m. UTC
From: Dmitry Sakhonchik <frezidok1@gmail.com>

Implements [YOCTO #12141]

Signed-off-by: Dmitry Sakhonchik <frezidok1@gmail.com>
---
 pseudo.h      | 14 +++++++-------
 pseudo_util.c |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

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;