[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/3] Fix build with later WDKs
- 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 - Adds XENBUS_STORE_PERM_READ_WRITE - warning is thrown when using XENBUS_STORE_PERM_READ | XENBUS_STORE_PERM_WRITE as a case label Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- include/store_interface.h | 1 + src/common/names.h | 7 +++++++ src/xen/unplug.c | 4 ++++ src/xenbus/evtchn.c | 2 ++ src/xenbus/pdo.c | 8 ++++++++ src/xenbus/store.c | 2 +- src/xenbus/suspend.c | 1 + src/xenbus/unplug.c | 1 + src/xenfilt/driver.c | 4 ++++ src/xenfilt/emulated.c | 1 + src/xenfilt/pdo.c | 10 ++++++++++ vs2019/package/package.vcxproj | 5 +++++ vs2019/version/version.vcxproj | 6 ++++++ vs2019/xen/xen.vcxproj | 3 +++ vs2019/xenbus/xenbus.vcxproj | 3 +++ vs2019/xenbus_coinst/xenbus_coinst.vcxproj | 3 +++ vs2019/xenbus_monitor/xenbus_monitor.vcxproj | 3 +++ vs2019/xenfilt/xenfilt.vcxproj | 3 +++ 18 files changed, 66 insertions(+), 1 deletion(-) diff --git a/include/store_interface.h b/include/store_interface.h index e1251dd..7742955 100644 --- a/include/store_interface.h +++ b/include/store_interface.h @@ -57,6 +57,7 @@ typedef enum _XENBUS_STORE_PERMISSION_MASK { XENBUS_STORE_PERM_NONE = 0, XENBUS_STORE_PERM_READ = 1, XENBUS_STORE_PERM_WRITE = 2, + XENBUS_STORE_PERM_READ_WRITE = 3, } XENBUS_STORE_PERMISSION_MASK; /*! \typedef XENBUS_STORE_PERMISSION diff --git a/src/common/names.h b/src/common/names.h index 84267d1..f80b020 100644 --- a/src/common/names.h +++ b/src/common/names.h @@ -123,6 +123,7 @@ PowerActionName( _POWER_ACTION_NAME(ShutdownReset); _POWER_ACTION_NAME(ShutdownOff); _POWER_ACTION_NAME(WarmEject); + _POWER_ACTION_NAME(DisplayOff); default: break; } @@ -330,6 +331,10 @@ DeviceUsageNotificationTypeName( _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; } @@ -368,6 +373,7 @@ InterfaceTypeName( _INTERFACE_TYPE_NAME(PNPBus); _INTERFACE_TYPE_NAME(Vmcs); _INTERFACE_TYPE_NAME(ACPIBus); + case MaximumInterfaceType: default: break; } @@ -392,6 +398,7 @@ DmaWidthName( _DMA_WIDTH_NAME(32Bits); _DMA_WIDTH_NAME(64Bits); _DMA_WIDTH_NAME(NoWrap); + case MaximumDmaWidth: default: break; } diff --git a/src/xen/unplug.c b/src/xen/unplug.c index c9a29a6..68608ac 100644 --- a/src/xen/unplug.c +++ b/src/xen/unplug.c @@ -126,6 +126,7 @@ UnplugDeviceType( LogPrintf(LOG_LEVEL_WARNING, "UNPLUG: NICS\n"); break; + case UNPLUG_TYPE_COUNT: default: ASSERT(FALSE); } @@ -210,6 +211,7 @@ UnplugSetRequest( case UNPLUG_NICS: ValueName = "NICS"; break; + case UNPLUG_TYPE_COUNT: default: ValueName = NULL; ASSERT(FALSE); @@ -255,6 +257,7 @@ UnplugIncrementValue( case UNPLUG_NICS: ValueName = "NICS"; break; + case UNPLUG_TYPE_COUNT: default: ValueName = NULL; ASSERT(FALSE); @@ -306,6 +309,7 @@ UnplugDecrementValue( case UNPLUG_NICS: ValueName = "NICS"; break; + case UNPLUG_TYPE_COUNT: default: ValueName = NULL; ASSERT(FALSE); diff --git a/src/xenbus/evtchn.c b/src/xenbus/evtchn.c index 8942cdf..3450bdd 100644 --- a/src/xenbus/evtchn.c +++ b/src/xenbus/evtchn.c @@ -366,6 +366,7 @@ EvtchnOpen( Arguments); break; + case XENBUS_EVTCHN_TYPE_INVALID: default: status = STATUS_INVALID_PARAMETER; break; @@ -1494,6 +1495,7 @@ EvtchnDebugCallback( Channel->Parameters.Virq.Index); break; + case XENBUS_EVTCHN_TYPE_INVALID: default: break; } diff --git a/src/xenbus/pdo.c b/src/xenbus/pdo.c index efd29dc..bbda42d 100644 --- a/src/xenbus/pdo.c +++ b/src/xenbus/pdo.c @@ -1144,6 +1144,10 @@ PdoQueryCapabilities( Capabilities->DeviceState[SystemPowerState] = PowerDeviceD0; break; + case PowerSystemSleeping3: + case PowerSystemHibernate: + case PowerSystemShutdown: + case PowerSystemMaximum: default: Capabilities->DeviceState[SystemPowerState] = PowerDeviceD3; break; @@ -1388,6 +1392,8 @@ PdoQueryId( Id.MaximumLength = (USHORT)(MAX_DEVICE_ID_LEN * ARRAYSIZE(PdoRevision)) * sizeof (WCHAR); break; + case BusQueryDeviceSerialNumber: + case BusQueryContainerID: default: Irp->IoStatus.Information = 0; status = STATUS_NOT_SUPPORTED; @@ -1476,6 +1482,8 @@ PdoQueryId( REGSTR_VAL_MAX_HCID_LEN); break; } + case BusQueryDeviceSerialNumber: + case BusQueryContainerID: default: Type = REG_NONE; diff --git a/src/xenbus/store.c b/src/xenbus/store.c index ce4c755..2fd2e19 100644 --- a/src/xenbus/store.c +++ b/src/xenbus/store.c @@ -1958,7 +1958,7 @@ StorePermissionToString( *Buffer = 'w'; break; - case XENBUS_STORE_PERM_READ | XENBUS_STORE_PERM_WRITE: + case XENBUS_STORE_PERM_READ_WRITE: *Buffer = 'b'; break; diff --git a/src/xenbus/suspend.c b/src/xenbus/suspend.c index f058a4f..30a6910 100644 --- a/src/xenbus/suspend.c +++ b/src/xenbus/suspend.c @@ -110,6 +110,7 @@ SuspendRegister( InsertTailList(&Context->LateList, &(*Callback)->ListEntry); break; + case SUSPEND_CALLBACK_TYPE_INVALID: default: ASSERT(FALSE); break; diff --git a/src/xenbus/unplug.c b/src/xenbus/unplug.c index 1ad737d..ba1cad1 100644 --- a/src/xenbus/unplug.c +++ b/src/xenbus/unplug.c @@ -101,6 +101,7 @@ UnplugRequest( break; + case XENBUS_UNPLUG_DEVICE_TYPE_INVALID: default: ASSERT(FALSE); break; diff --git a/src/xenfilt/driver.c b/src/xenfilt/driver.c index f131282..91e925e 100644 --- a/src/xenfilt/driver.c +++ b/src/xenfilt/driver.c @@ -492,6 +492,8 @@ DriverQueryId( status = STATUS_SUCCESS; break; + case BusQueryDeviceSerialNumber: + case BusQueryContainerID: default: status = STATUS_NOT_SUPPORTED; break; @@ -604,6 +606,8 @@ DriverQueryId( break; } + case BusQueryDeviceSerialNumber: + case BusQueryContainerID: default: ASSERT(FALSE); *Id = NULL; diff --git a/src/xenfilt/emulated.c b/src/xenfilt/emulated.c index 0c2c087..b7ae510 100644 --- a/src/xenfilt/emulated.c +++ b/src/xenfilt/emulated.c @@ -257,6 +257,7 @@ EmulatedAddObject( CompatibleIDs); break; + case XENFILT_EMULATED_OBJECT_TYPE_UNKNOWN: default: status = STATUS_INVALID_PARAMETER; break; diff --git a/src/xenfilt/pdo.c b/src/xenfilt/pdo.c index b3569a3..22618b7 100644 --- a/src/xenfilt/pdo.c +++ b/src/xenfilt/pdo.c @@ -1093,6 +1093,7 @@ PdoQueryDeviceText( Trace("DeviceTextLocationInformation\n"); break; + case DeviceTextDescription: default: goto done; } @@ -1120,6 +1121,7 @@ PdoQueryDeviceText( break; + case DeviceTextDescription: default: ASSERT(FALSE); break; @@ -1191,6 +1193,10 @@ PdoQueryId( Trace("BusQueryDeviceID\n"); break; + case BusQueryHardwareIDs: + case BusQueryCompatibleIDs: + case BusQueryDeviceSerialNumber: + case BusQueryContainerID: default: goto done; } @@ -1225,6 +1231,10 @@ PdoQueryId( break; + case BusQueryHardwareIDs: + case BusQueryCompatibleIDs: + case BusQueryDeviceSerialNumber: + case BusQueryContainerID: default: ASSERT(FALSE); break; diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj index 2a83c90..e10717a 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/xen/xen.vcxproj b/vs2019/xen/xen.vcxproj index 39b5bda..237c348 100644 --- a/vs2019/xen/xen.vcxproj +++ b/vs2019/xen/xen.vcxproj @@ -37,6 +37,9 @@ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <ModuleDefinitionFile>../../src/xen/xen.def</ModuleDefinitionFile> </Link> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> <ClCompile> diff --git a/vs2019/xenbus/xenbus.vcxproj b/vs2019/xenbus/xenbus.vcxproj index ff40c43..c61141c 100644 --- a/vs2019/xenbus/xenbus.vcxproj +++ b/vs2019/xenbus/xenbus.vcxproj @@ -36,6 +36,9 @@ <AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/procgrp.lib;$(DDK_LIB_PATH)/rtlver.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> <ClCompile> diff --git a/vs2019/xenbus_coinst/xenbus_coinst.vcxproj b/vs2019/xenbus_coinst/xenbus_coinst.vcxproj index df3cc04..5a8bcf6 100644 --- a/vs2019/xenbus_coinst/xenbus_coinst.vcxproj +++ b/vs2019/xenbus_coinst/xenbus_coinst.vcxproj @@ -35,6 +35,9 @@ <ResourceCompile> <AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> <ClCompile> diff --git a/vs2019/xenbus_monitor/xenbus_monitor.vcxproj b/vs2019/xenbus_monitor/xenbus_monitor.vcxproj index 8703bb5..7352a07 100644 --- a/vs2019/xenbus_monitor/xenbus_monitor.vcxproj +++ b/vs2019/xenbus_monitor/xenbus_monitor.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/xenfilt/xenfilt.vcxproj b/vs2019/xenfilt/xenfilt.vcxproj index b3ce00f..cc0de85 100644 --- a/vs2019/xenfilt/xenfilt.vcxproj +++ b/vs2019/xenfilt/xenfilt.vcxproj @@ -36,6 +36,9 @@ <AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> <ClCompile> -- 2.31.1.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |