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

[PATCH 1/3] Fix build with later WDKs


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Thu, 12 Aug 2021 13:36:10 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Thu, 12 Aug 2021 12:36:36 +0000
  • Ironport-hdrordr: A9a23:2yK9eKOs/5mAx8BcTs2jsMiBIKoaSvp037Eqv3oedfUzSL39qy nOpoV86faaslYssR0b9exoW5PwJE80l6QFgrX5VI3KNGKN1VdARLsSircKqAeAJ8SRzIFgPN 9bAspDNOE=
  • Ironport-sdr: X5CbTqegv86l57gLFGtH4YZ1GyovEsmHDzVsD9VzF2U5VA2OmPgk1aXRzyYXwr3m3jGpXgCc6y t2pbYAeovOKKYtCTtD5sh//d/FI2SdbAISJ1WnpleiDyzfJ1HwJ2DoW3ZaSuPyPQkunXp7mYEw UwQsztNqVklNTMYqa1pJrtateniuBKPTuJA4f34CszS5zvEwdX0B1TWerkmt9HkeG2sR6WtA16 bH0A2hXmvgbnVmQnoNYe0MlYceUKBYYRoUrtbfrhLLB91/9sDPMrS4AdoGkJL918VoTDbQ/Qkg B+PHMSZcL3HbGgPp5jnuZLA8
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

- Adds alias for GetProjectInfoForReference target to version.vcxproj
    Later kits seemed to have renamed the build target, and will fail without
    this alias target.
- Adds "/fd sha256" to signtool command line
    WDK 20344 and later require binaries signed with a SHA256 file digest, or
    the build outputs are deleted
- Fixes warning 4061 - switch statement on enum types need to have a case for
    all values of the enumeration

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xeniface/driver.c                          | 1 +
 src/xeniface/names.h                           | 5 +++++
 src/xeniface/wmi.c                             | 1 +
 vs2019/package/package.vcxproj                 | 5 +++++
 vs2019/version/version.vcxproj                 | 6 ++++++
 vs2019/xenagent/xenagent.vcxproj               | 3 +++
 vs2019/xencontrol/xencontrol.vcxproj           | 3 +++
 vs2019/xeniface/xeniface.vcxproj               | 3 +++
 vs2019/xeniface_coinst/xeniface_coinst.vcxproj | 3 +++
 9 files changed, 30 insertions(+)

diff --git a/src/xeniface/driver.c b/src/xeniface/driver.c
index 2087cad..5ba4469 100644
--- a/src/xeniface/driver.c
+++ b/src/xeniface/driver.c
@@ -121,6 +121,7 @@ Dispatch(
         status = FdoDispatch(Fdo, Irp);
         break;
     }
+    case PHYSICAL_DEVICE_OBJECT:
     default:
         ASSERT(FALSE);
         break;
diff --git a/src/xeniface/names.h b/src/xeniface/names.h
index 9d282f7..9237e18 100644
--- a/src/xeniface/names.h
+++ b/src/xeniface/names.h
@@ -124,6 +124,7 @@ PowerActionName(
     _POWER_ACTION_NAME(ShutdownReset);
     _POWER_ACTION_NAME(ShutdownOff);
     _POWER_ACTION_NAME(WarmEject);
+    _POWER_ACTION_NAME(DisplayOff);
     default:
         break;
     }
@@ -266,6 +267,10 @@ DeviceUsageTypeName(
     _DEVICE_USAGE_TYPE_NAME(Paging);
     _DEVICE_USAGE_TYPE_NAME(Hibernation);
     _DEVICE_USAGE_TYPE_NAME(DumpFile);
+    _DEVICE_USAGE_TYPE_NAME(Undefined);
+    _DEVICE_USAGE_TYPE_NAME(Boot);
+    _DEVICE_USAGE_TYPE_NAME(PostDisplay);
+    _DEVICE_USAGE_TYPE_NAME(GuestAssigned);
     default:
         break;
     }
diff --git a/src/xeniface/wmi.c b/src/xeniface/wmi.c
index 7cdb20d..b09cbff 100644
--- a/src/xeniface/wmi.c
+++ b/src/xeniface/wmi.c
@@ -464,6 +464,7 @@ int AccessWmiBuffer(PUCHAR Buffer, int readbuffer, ULONG * 
RequiredSize,
                         position += sizeof(WCHAR)*25;
                     }
                     break;
+                case WMI_DONE:
                 default:
                     return FALSE;
             }
diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj
index 31dacd3..2fe1204 100644
--- a/vs2019/package/package.vcxproj
+++ b/vs2019/package/package.vcxproj
@@ -32,6 +32,11 @@
     <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
     <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
   </PropertyGroup>
+  <ItemDefinitionGroup>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
+  </ItemDefinitionGroup>
   <PropertyGroup Condition="'$(Platform)'=='Win32'">
     <ArchiveDir>..\..\$(SolutionName)\x86</ArchiveDir>
   </PropertyGroup>
diff --git a/vs2019/version/version.vcxproj b/vs2019/version/version.vcxproj
index 9d149d0..b6ec6f3 100644
--- a/vs2019/version/version.vcxproj
+++ b/vs2019/version/version.vcxproj
@@ -13,4 +13,10 @@
   <Target Name="Build">
     <Exec Command="powershell.exe -ExecutionPolicy Bypass -NoProfile 
-NonInteractive -File $(Script) $(Platform) $(SolutionDir) $(IncludeDir) 
$(SourceDir)" />
   </Target>
+  <Target Name="GetProjectInfoForReference"
+          Returns="@(ProjectInfoForReference)">
+    <ItemGroup>
+      <ProjectInfoForReference Include="@(LibFullPath)" />
+    </ItemGroup>
+  </Target>
 </Project>
diff --git a/vs2019/xenagent/xenagent.vcxproj b/vs2019/xenagent/xenagent.vcxproj
index eff385b..1076c81 100644
--- a/vs2019/xenagent/xenagent.vcxproj
+++ b/vs2019/xenagent/xenagent.vcxproj
@@ -37,6 +37,9 @@
     <ResourceCompile>
       
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ResourceCompile>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xencontrol/xencontrol.vcxproj 
b/vs2019/xencontrol/xencontrol.vcxproj
index f54d6b5..36383d8 100644
--- a/vs2019/xencontrol/xencontrol.vcxproj
+++ b/vs2019/xencontrol/xencontrol.vcxproj
@@ -36,6 +36,9 @@
     <ResourceCompile>
       
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ResourceCompile>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xeniface/xeniface.vcxproj b/vs2019/xeniface/xeniface.vcxproj
index b258815..1df86f5 100644
--- a/vs2019/xeniface/xeniface.vcxproj
+++ b/vs2019/xeniface/xeniface.vcxproj
@@ -36,6 +36,9 @@
       
<AdditionalDependencies>$(DDK_LIB_PATH)\ntstrsafe.lib;$(DDK_LIB_PATH)\procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     </Link>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xeniface_coinst/xeniface_coinst.vcxproj 
b/vs2019/xeniface_coinst/xeniface_coinst.vcxproj
index b011416..77e6836 100644
--- a/vs2019/xeniface_coinst/xeniface_coinst.vcxproj
+++ b/vs2019/xeniface_coinst/xeniface_coinst.vcxproj
@@ -34,6 +34,9 @@
     <ResourceCompile>
       
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ResourceCompile>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
-- 
2.31.1.windows.1




 


Rackspace

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