diff options
Diffstat (limited to 'src/burn/engine/bundlepackageengine.cpp')
| -rw-r--r-- | src/burn/engine/bundlepackageengine.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp index b5fc51e5..88a00f5e 100644 --- a/src/burn/engine/bundlepackageengine.cpp +++ b/src/burn/engine/bundlepackageengine.cpp | |||
| @@ -2,7 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | 5 | static BOOTSTRAPPER_RELATION_TYPE ConvertRelationType( | |
| 6 | __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE relationType | ||
| 7 | ); | ||
| 6 | 8 | ||
| 7 | // function definitions | 9 | // function definitions |
| 8 | 10 | ||
| @@ -265,7 +267,7 @@ extern "C" HRESULT BundlePackageEngineExecuteRelatedBundle( | |||
| 265 | GENERIC_EXECUTE_MESSAGE message = { }; | 267 | GENERIC_EXECUTE_MESSAGE message = { }; |
| 266 | BOOTSTRAPPER_ACTION_STATE action = pExecuteAction->relatedBundle.action; | 268 | BOOTSTRAPPER_ACTION_STATE action = pExecuteAction->relatedBundle.action; |
| 267 | BURN_RELATED_BUNDLE* pRelatedBundle = pExecuteAction->relatedBundle.pRelatedBundle; | 269 | BURN_RELATED_BUNDLE* pRelatedBundle = pExecuteAction->relatedBundle.pRelatedBundle; |
| 268 | BOOTSTRAPPER_RELATION_TYPE relationType = pRelatedBundle->relationType; | 270 | BOOTSTRAPPER_RELATION_TYPE relationType = ConvertRelationType(pRelatedBundle->planRelationType); |
| 269 | BURN_PACKAGE* pPackage = &pRelatedBundle->package; | 271 | BURN_PACKAGE* pPackage = &pRelatedBundle->package; |
| 270 | BURN_PAYLOAD* pPackagePayload = pPackage->payloads.rgItems[0].pPayload; | 272 | BURN_PAYLOAD* pPackagePayload = pPackage->payloads.rgItems[0].pPayload; |
| 271 | LPCWSTR wzRelationTypeCommandLine = CoreRelationTypeToCommandLineString(relationType); | 273 | LPCWSTR wzRelationTypeCommandLine = CoreRelationTypeToCommandLineString(relationType); |
| @@ -467,3 +469,26 @@ LExit: | |||
| 467 | 469 | ||
| 468 | return hr; | 470 | return hr; |
| 469 | } | 471 | } |
| 472 | |||
| 473 | static BOOTSTRAPPER_RELATION_TYPE ConvertRelationType( | ||
| 474 | __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE relationType | ||
| 475 | ) | ||
| 476 | { | ||
| 477 | switch (relationType) | ||
| 478 | { | ||
| 479 | case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DOWNGRADE: __fallthrough; | ||
| 480 | case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_UPGRADE: | ||
| 481 | return BOOTSTRAPPER_RELATION_UPGRADE; | ||
| 482 | case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_ADDON: | ||
| 483 | return BOOTSTRAPPER_RELATION_ADDON; | ||
| 484 | case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_PATCH: | ||
| 485 | return BOOTSTRAPPER_RELATION_PATCH; | ||
| 486 | case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_ADDON: | ||
| 487 | return BOOTSTRAPPER_RELATION_DEPENDENT_ADDON; | ||
| 488 | case BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_PATCH: | ||
| 489 | return BOOTSTRAPPER_RELATION_DEPENDENT_PATCH; | ||
| 490 | default: | ||
| 491 | AssertSz(BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_NONE == relationType, "Unknown BUNDLE_RELATION_TYPE"); | ||
| 492 | return BOOTSTRAPPER_RELATION_NONE; | ||
| 493 | } | ||
| 494 | } | ||
