[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 Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- src/xencons/frontend.c | 36 ++++++------------- src/xencons/names.h | 5 +++ src/xencons/pdo.c | 8 +++++ vs2019/package/package.vcxproj | 5 +++ vs2019/version/version.vcxproj | 6 ++++ vs2019/xencons/xencons.vcxproj | 3 ++ vs2019/xencons_coinst/xencons_coinst.vcxproj | 3 ++ .../xencons_monitor/xencons_monitor.vcxproj | 3 ++ vs2019/xencons_tty/xencons_tty.vcxproj | 3 ++ 9 files changed, 47 insertions(+), 25 deletions(-) diff --git a/src/xencons/frontend.c b/src/xencons/frontend.c index 6965092..6f9d34b 100644 --- a/src/xencons/frontend.c +++ b/src/xencons/frontend.c @@ -598,17 +598,12 @@ FrontendClose( FrontendWaitForBackendXenbusStateChange(Frontend, &State); - switch (State) { - case XenbusStateClosing: + if (State == XenbusStateClosing) { FrontendSetXenbusState(Frontend, XenbusStateClosed); - break; - case XenbusStateClosed: - break; - default: + } else if (State != XenbusStateClosed) { FrontendSetXenbusState(Frontend, XenbusStateClosing); - break; } } @@ -646,10 +641,7 @@ FrontendPrepare( FrontendWaitForBackendXenbusStateChange(Frontend, &State); - switch (State) { - case XenbusStateInitWait: - break; - case XenbusStateClosed: + if (State == XenbusStateClosed) { FrontendSetXenbusState(Frontend, XenbusStateClosed); // There is currently a bug in the backend. @@ -658,11 +650,9 @@ FrontendPrepare( // Avoid the bug by forcing the frontend offline and // failing FrontendPrepare FrontendSetOffline(Frontend); - break; - default: + } else if (State != XenbusStateInitWait) { FrontendSetXenbusState(Frontend, XenbusStateInitialising); - break; } } @@ -800,20 +790,11 @@ FrontendConnect( FrontendWaitForBackendXenbusStateChange(Frontend, &State); - switch (State) { - case XenbusStateInitWait: + if (State == XenbusStateInitWait) { FrontendSetXenbusState(Frontend, XenbusStateConnected); - break; - case XenbusStateConnected: - break; - case XenbusStateUnknown: - case XenbusStateClosing: - case XenbusStateClosed: + } else if (State != XenbusStateConnected) { FrontendSetOffline(Frontend); - break; - default: - break; } } @@ -982,6 +963,7 @@ FrontendSetState( } break; + case FRONTEND_UNKNOWN: default: ASSERT(FALSE); break; @@ -1005,6 +987,7 @@ FrontendSetState( Frontend->State = FRONTEND_UNKNOWN; break; + case FRONTEND_CLOSED: default: ASSERT(FALSE); break; @@ -1032,6 +1015,7 @@ FrontendSetState( Frontend->State = FRONTEND_CLOSED; break; + case FRONTEND_PREPARED: default: ASSERT(FALSE); break; @@ -1062,6 +1046,7 @@ FrontendSetState( FrontendDisconnect(Frontend); break; + case FRONTEND_CONNECTED: default: ASSERT(FALSE); break; @@ -1078,6 +1063,7 @@ FrontendSetState( Frontend->State = FRONTEND_CONNECTED; break; + case FRONTEND_ENABLED: default: ASSERT(FALSE); break; diff --git a/src/xencons/names.h b/src/xencons/names.h index 1c06563..f06263c 100644 --- a/src/xencons/names.h +++ b/src/xencons/names.h @@ -122,6 +122,7 @@ PowerActionName( _POWER_ACTION_NAME(ShutdownReset); _POWER_ACTION_NAME(ShutdownOff); _POWER_ACTION_NAME(WarmEject); + _POWER_ACTION_NAME(DisplayOff); default: break; } @@ -238,6 +239,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/xencons/pdo.c b/src/xencons/pdo.c index b7177a9..e8dcebd 100644 --- a/src/xencons/pdo.c +++ b/src/xencons/pdo.c @@ -878,6 +878,10 @@ PdoQueryCapabilities( Capabilities->DeviceState[SystemPowerState] = PowerDeviceD0; break; + case PowerSystemSleeping3: + case PowerSystemHibernate: + case PowerSystemShutdown: + case PowerSystemMaximum: default: Capabilities->DeviceState[SystemPowerState] = PowerDeviceD3; break; @@ -1049,6 +1053,8 @@ PdoQueryId( Id.MaximumLength = (USHORT)(MAX_DEVICE_ID_LEN * sizeof(WCHAR)); break; + case BusQueryDeviceSerialNumber: + case BusQueryContainerID: default: Irp->IoStatus.Information = 0; status = STATUS_NOT_SUPPORTED; @@ -1126,6 +1132,8 @@ PdoQueryId( REGSTR_VAL_MAX_HCID_LEN); break; } + case BusQueryDeviceSerialNumber: + case BusQueryContainerID: default: Type = REG_NONE; diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj index 2248fe0..0e86126 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/xencons/xencons.vcxproj b/vs2019/xencons/xencons.vcxproj index 6cabdcf..09d25bc 100644 --- a/vs2019/xencons/xencons.vcxproj +++ b/vs2019/xencons/xencons.vcxproj @@ -36,6 +36,9 @@ <AdditionalDependencies>$(DDK_LIB_PATH)/Rtlver.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/ksecdd.lib;$(DDK_LIB_PATH)/procgrp.lib;$(DDK_LIB_PATH)/wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies> <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> <ClCompile> diff --git a/vs2019/xencons_coinst/xencons_coinst.vcxproj b/vs2019/xencons_coinst/xencons_coinst.vcxproj index 27f54c5..b10a8ca 100644 --- a/vs2019/xencons_coinst/xencons_coinst.vcxproj +++ b/vs2019/xencons_coinst/xencons_coinst.vcxproj @@ -34,6 +34,9 @@ <ModuleDefinitionFile>../../src/coinst/xencons_coinst.def</ModuleDefinitionFile> <AdditionalDependencies>setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> <ClCompile> diff --git a/vs2019/xencons_monitor/xencons_monitor.vcxproj b/vs2019/xencons_monitor/xencons_monitor.vcxproj index c867fa8..b016a6f 100644 --- a/vs2019/xencons_monitor/xencons_monitor.vcxproj +++ b/vs2019/xencons_monitor/xencons_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/xencons_tty/xencons_tty.vcxproj b/vs2019/xencons_tty/xencons_tty.vcxproj index 16a04ff..303f158 100644 --- a/vs2019/xencons_tty/xencons_tty.vcxproj +++ b/vs2019/xencons_tty/xencons_tty.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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |