[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 08/18] Annotate logging format strings


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Date: Fri, 16 Oct 2026 15:26:45 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:In-Reply-To:References:Feedback-ID"
  • Cc: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Delivery-date: Fri, 16 Oct 2026 13:27:14 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Annotate logging functions with corresponding STR typedefs.

Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
 src/xencrsh/log.c  | 10 +++++-----
 src/xencrsh/log.h  |  4 ++--
 src/xenvbd/debug.h |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/xencrsh/log.c b/src/xencrsh/log.c
index dbff879..2d19aaf 100644
--- a/src/xencrsh/log.c
+++ b/src/xencrsh/log.c
@@ -276,15 +276,15 @@ LogVDebug(
 
 void
 __LogMessage(
-    _In_ ULONG      Level,
-    _In_ const char *Function,
-    _In_ const char *Format,
+    _In_ ULONG          Level,
+    _In_ PCSTR          Function,
+    _In_ PCSTR          Format,
     ...
     )
 {
     // Note: __MODULE__ is not defined in SDV builds :(
-    static const char* Module = "XENCRSH";
-    va_list     Args;
+    static const char*  Module = "XENCRSH";
+    va_list             Args;
 
     va_start(Args, Format);
     LogPrintf(LogQemuPut, "%s|%s|%s:", Module, __Mode(), Function);
diff --git a/src/xencrsh/log.h b/src/xencrsh/log.h
index f2cc918..f6d71c3 100644
--- a/src/xencrsh/log.h
+++ b/src/xencrsh/log.h
@@ -41,8 +41,8 @@
 extern void
 __LogMessage(
     _In_ ULONG      Level,
-    _In_ const char *Func,
-    _In_ const char *Format,
+    _In_ PCSTR      Function,
+    _In_ PCSTR      Format,
     ...
     );
 
diff --git a/src/xenvbd/debug.h b/src/xenvbd/debug.h
index 617ad99..51948f2 100644
--- a/src/xenvbd/debug.h
+++ b/src/xenvbd/debug.h
@@ -55,8 +55,8 @@
 static __inline VOID
 __DebugMessage(
     _In_ ULONG                          Level,
-    _In_ __nullterminated const CHAR    *Prefix,
-    _In_ __nullterminated const CHAR    *Format,
+    _In_ PCSTR                          Prefix,
+    _In_ _Printf_format_string_ PCSTR   Format,
     ...
     )
 {
-- 
2.55.0.windows.5



--
Césaire Mounah | Vates Windows Guest Tools Engineer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.