]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commit
xencontrol: Fix return values and simplify failure paths
authorRafał Wojdyła <omeg@invisiblethingslab.com>
Fri, 15 Mar 2024 10:11:33 +0000 (11:11 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Mon, 25 Mar 2024 09:31:34 +0000 (09:31 +0000)
commit91af87373aa1f2d2eae072ebaac67215534724c1
tree5070b825b9b90763754664b9705ffb04f6c0b672
parent1019522273c7080d73885e38e972092df4fcce0f
xencontrol: Fix return values and simplify failure paths

XcGnttabRevokeForeignAccess() and XcGnttabUnmapForeignPages()
could return error values even when the calls succeeded. This was because
GetLastError() was used to get the return value even if the previous call
to DeviceIoControl() succeeded.

This commit also reworks all xencontrol functions to use simpler control
paths in failure cases.

Signed-off-by: Rafał Wojdyła <omeg@invisiblethingslab.com>
src/xencontrol/xencontrol.c