From 4cfd5f14430bef4af5b47a479eefaef4335f59cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20N=C3=B8rfjand=20Stengaard?= Date: Fri, 30 Sep 2022 11:47:33 +0200 Subject: [PATCH] Add formatting of DOS4-7, but not tested. Update hst amiga with formatting fixes. Fix rdb init disk size calculation. --- src/Hst.Imager.ConsoleApp/Hst.Imager.ConsoleApp.csproj | 3 +++ src/Hst.Imager.Core/Commands/RdbInitCommand.cs | 2 +- src/Hst.Imager.Core/Commands/RdbPartFormatCommand.cs | 4 ++++ src/Hst.Imager.Core/Hst.Imager.Core.csproj | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Hst.Imager.ConsoleApp/Hst.Imager.ConsoleApp.csproj b/src/Hst.Imager.ConsoleApp/Hst.Imager.ConsoleApp.csproj index 1d4baf2..4eb098b 100644 --- a/src/Hst.Imager.ConsoleApp/Hst.Imager.ConsoleApp.csproj +++ b/src/Hst.Imager.ConsoleApp/Hst.Imager.ConsoleApp.csproj @@ -27,6 +27,9 @@ Always + + Always + diff --git a/src/Hst.Imager.Core/Commands/RdbInitCommand.cs b/src/Hst.Imager.Core/Commands/RdbInitCommand.cs index c03ed7f..0d15cd1 100644 --- a/src/Hst.Imager.Core/Commands/RdbInitCommand.cs +++ b/src/Hst.Imager.Core/Commands/RdbInitCommand.cs @@ -56,7 +56,7 @@ public override async Task Execute(CancellationToken token) diskGeometry = new DiskGeometry { - DiskSize = cylinders * heads * sectors * 512, + DiskSize = (long)cylinders * heads * sectors * 512, Cylinders = cylinders, Heads = heads, Sectors = sectors diff --git a/src/Hst.Imager.Core/Commands/RdbPartFormatCommand.cs b/src/Hst.Imager.Core/Commands/RdbPartFormatCommand.cs index 111ec9d..5328397 100644 --- a/src/Hst.Imager.Core/Commands/RdbPartFormatCommand.cs +++ b/src/Hst.Imager.Core/Commands/RdbPartFormatCommand.cs @@ -71,6 +71,10 @@ public override async Task Execute(CancellationToken token) switch (partitionBlock.DosTypeFormatted) { case "DOS\\3": + case "DOS\\4": + case "DOS\\5": + case "DOS\\6": + case "DOS\\7": await FastFileSystemFormatter.FormatPartition(stream, partitionBlock, name); break; case "PDS\\3": diff --git a/src/Hst.Imager.Core/Hst.Imager.Core.csproj b/src/Hst.Imager.Core/Hst.Imager.Core.csproj index 4af1eaf..ac55fbc 100644 --- a/src/Hst.Imager.Core/Hst.Imager.Core.csproj +++ b/src/Hst.Imager.Core/Hst.Imager.Core.csproj @@ -5,7 +5,7 @@ - +