Skip to content

Commit

Permalink
Add sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gus33000 committed Sep 22, 2024
1 parent ccef75b commit 76b0f5c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Img2Ffu.Library/Writer/FFUFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ public static void GenerateFFU(
return;
}

if (!InputsForStores.Any())
{
Logging.Log("At least one store must be specified in order to generate a FFU file!", ILoggingLevel.Error);
return;
}

if (InputsForStores.Count() > 1 && FlashUpdateVersion != FlashUpdateVersion.V2)
{
Logging.Log("Multiple stores is only supported with Flash Update Version 2!", ILoggingLevel.Error);
return;
}

Logging.Log($"Destination image: {FFUFile}");
Logging.Log($"Platform IDs: {string.Join("\nPlatform IDs: ", PlatformIDs)}");
Logging.Log($"Sector Size: {SectorSize}");
Expand Down

0 comments on commit 76b0f5c

Please sign in to comment.