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

[PATCH 14/18] xenvbd: Fix the Interface annotation of __AdapterQueryInterface


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
  • Date: Fri, 16 Oct 2026 15:26:51 +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:11 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Interface is a buffer of Size bytes filled by the lower driver, and it
is left untouched when an optional interface is not supported. Annotate
it _Inout_updates_bytes_(Size) instead of _Out_.
No functional change.

Assisted-by: claude:claude-opus-5.5
Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
 src/xenvbd/adapter.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/xenvbd/adapter.c b/src/xenvbd/adapter.c
index 7158db0..5b787d1 100644
--- a/src/xenvbd/adapter.c
+++ b/src/xenvbd/adapter.c
@@ -1225,19 +1225,19 @@ __AdapterSetBootEmulated(
 _IRQL_requires_(PASSIVE_LEVEL)
 static NTSTATUS
 __AdapterQueryInterface(
-    _In_ PXENVBD_ADAPTER    Adapter,
-    _In_ const GUID         *Guid,
-    _In_ ULONG              Version,
-    _Out_ PINTERFACE        Interface,
-    _In_ ULONG              Size,
-    _In_ BOOLEAN            Optional
+    _In_ PXENVBD_ADAPTER                    Adapter,
+    _In_ const GUID                         *Guid,
+    _In_ ULONG                              Version,
+    _Inout_updates_bytes_(Size) PINTERFACE  Interface,
+    _In_ ULONG                              Size,
+    _In_ BOOLEAN                            Optional
     )
 {
-    KEVENT                  Event;
-    IO_STATUS_BLOCK         StatusBlock;
-    PIRP                    Irp;
-    PIO_STACK_LOCATION      StackLocation;
-    NTSTATUS                status;
+    KEVENT                                  Event;
+    IO_STATUS_BLOCK                         StatusBlock;
+    PIRP                                    Irp;
+    PIO_STACK_LOCATION                      StackLocation;
+    NTSTATUS                                status;
 
     ASSERT3U(KeGetCurrentIrql(), ==, PASSIVE_LEVEL);
 
-- 
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®.