From 0730f4058b4aecccde18dc8c3c0e7711b561a1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20N=C3=B8rfjand=20Stengaard?= Date: Fri, 2 Dec 2022 19:37:46 +0100 Subject: [PATCH] Update usage, help and descriptions --- .../MbrCommandFactory.cs | 2 +- .../RdbCommandFactory.cs | 40 +++++++++---------- src/Hst.Imager.ConsoleApp/readme.md | 21 +++++++++- src/Hst.Imager.ConsoleApp/usage.md | 2 +- 4 files changed, 41 insertions(+), 24 deletions(-) diff --git a/src/Hst.Imager.ConsoleApp/MbrCommandFactory.cs b/src/Hst.Imager.ConsoleApp/MbrCommandFactory.cs index f93473e..9d611c8 100644 --- a/src/Hst.Imager.ConsoleApp/MbrCommandFactory.cs +++ b/src/Hst.Imager.ConsoleApp/MbrCommandFactory.cs @@ -61,7 +61,7 @@ private static Command CreateMbrPartAdd() var typeArgument = new Argument( name: "Type", - description: "Type for the partition to use (eg. FAT32)."); + description: "Type for the partition to use (e.g. FAT32)."); var sizeArgument = new Argument( name: "Size", diff --git a/src/Hst.Imager.ConsoleApp/RdbCommandFactory.cs b/src/Hst.Imager.ConsoleApp/RdbCommandFactory.cs index 8a8c5e7..e2d007c 100644 --- a/src/Hst.Imager.ConsoleApp/RdbCommandFactory.cs +++ b/src/Hst.Imager.ConsoleApp/RdbCommandFactory.cs @@ -90,7 +90,7 @@ private static Command CreateRdbFsAdd() var dosTypeArgument = new Argument( name: "DosType", - description: "Dos Type for file system (eg. DOS3, PDS3)."); + description: "Dos Type for file system (e.g. DOS3, PDS3)."); var fileSystemNameOption = new Option( new[] { "--name", "-n" }, @@ -138,7 +138,7 @@ private static Command CreateRdbFsImport() var dosTypeOption = new Option( new[] { "--dos-type", "-dt" }, - description: "Dos Type for file system (eg. DOS3, PDS3)."); + description: "Dos Type for file system (e.g. DOS3, PDS3)."); var fileSystemNameOption = new Option( new[] { "--name", "-n" }, @@ -190,7 +190,7 @@ private static Command CreateRdbFsUpdate() var dosTypeArgument = new Option( new[] { "--dos-type", "-dt" }, - description: "Dos type for file system (eg. DOS3, PDS3)."); + description: "Dos type for file system (e.g. DOS3, PDS3)."); var fileSystemNameOption = new Option( new[] { "--name", "-n" }, @@ -236,11 +236,11 @@ private static Command CreateRdbPartAdd() var dosTypeArgument = new Argument( name: "DosType", - description: "DOS type for the partition to use (eg. DOS3, PFS3)."); + description: "DOS type for the partition to use (e.g. DOS3, PFS3)."); var nameArgument = new Argument( name: "Name", - description: "Name of the partition (eg. DH0)."); + description: "Name of the partition (e.g. DH0)."); var sizeArgument = new Argument( name: "Size", @@ -260,11 +260,11 @@ private static Command CreateRdbPartAdd() var maxTransferOption = new Option( new[] { "--max-transfer", "-mt" }, - description: "Set buffers"); + description: "Max transfer (integer or hex value e.g. 0x1fe00)"); var maskOption = new Option( new[] { "--mask", "-ma" }, - description: "Mask"); + description: "Mask (integer or hex value e.g. 0x7ffffffe)"); var noMountOption = new Option( new[] { "--no-mount", "-nm" }, @@ -336,11 +336,11 @@ private static Command CreateRdbPartUpdate() var dosTypeOption = new Option( new[] { "--dos-type", "-dt" }, - description: "DOS type for the partition to use (eg. DOS3, PFS3)."); + description: "DOS type for the partition to use (e.g. DOS3, PFS3)."); var nameOption = new Option( new[] { "--name", "-n" }, - description: "Name of the partition (eg. DH0)."); + description: "Name of the partition (e.g. DH0)."); var reservedOption = new Option( new[] { "--reserved", "-r" }, @@ -356,11 +356,11 @@ private static Command CreateRdbPartUpdate() var maxTransferOption = new Option( new[] { "--max-transfer", "-mt" }, - description: "Max transfer"); + description: "Max transfer (integer or hex value e.g. 0x1fe00)"); var maskOption = new Option( new[] { "--mask", "-ma" }, - description: "Mask"); + description: "Mask (integer or hex value e.g. 0x7ffffffe)"); var noMountOption = new Option( new[] { "--no-mount", "-nm" }, @@ -453,7 +453,7 @@ private static Command CreateRdbPartCopy() var nameOption = new Option( new[] { "--name", "-n" }, - description: "Name of the partition (eg. DH0)."); + description: "Name of the partition (e.g. DH0)."); var rdbPartDelCommand = new Command("copy", "Copy partition from a physical drive or image file."); rdbPartDelCommand.SetHandler(CommandHandler.RdbPartCopy, sourcePathArgument, partitionNumber, @@ -478,9 +478,9 @@ private static Command CreateRdbPartExport() var destinationPathArgument = new Argument( name: "DestinationPath", - description: "Path to destination file (eg. DH0.hdf)."); + description: "Path to destination file (e.g. DH0.hdf)."); - var command = new Command("export", "Export partition to a hard file (eg. DH0.hdf)."); + var command = new Command("export", "Export partition to a hard file (e.g. DH0.hdf)."); command.SetHandler(CommandHandler.RdbPartExport, sourcePathArgument, partitionNumber, destinationPathArgument); command.AddArgument(sourcePathArgument); @@ -494,7 +494,7 @@ private static Command CreateRdbPartImport() { var sourcePathArgument = new Argument( name: "SourcePath", - description: "Path to source hard file (eg. DH0.hdf)."); + description: "Path to source hard file (e.g. DH0.hdf)."); var destinationPathArgument = new Argument( name: "DestinationPath", @@ -502,11 +502,11 @@ private static Command CreateRdbPartImport() var dosTypeArgument = new Argument( name: "DosType", - description: "DOS type for the partition to use (eg. DOS3, PFS3)."); + description: "DOS type for the partition to use (e.g. DOS3, PFS3)."); var nameArgument = new Argument( name: "Name", - description: "Name of the partition (eg. DH0)."); + description: "Name of the partition (e.g. DH0)."); var fileSystemBlockSizeOption = new Option( new[] { "--block-size", "-bs" }, @@ -518,7 +518,7 @@ private static Command CreateRdbPartImport() description: "Set bootable.", getDefaultValue: () => false); - var command = new Command("import", "Import partition from a hard file (eg. DH0.hdf)."); + var command = new Command("import", "Import partition from a hard file (e.g. DH0.hdf)."); command.SetHandler(CommandHandler.RdbPartImport, sourcePathArgument, destinationPathArgument, nameArgument, dosTypeArgument, fileSystemBlockSizeOption, bootableOption); command.AddArgument(sourcePathArgument); @@ -543,7 +543,7 @@ private static Command CreateRdbPartKill() var hexBootBytesArgument = new Argument( name: "HexBootBytes", - description: "Boot bytes in hex to write (eg. 00000000)."); + description: "Boot bytes in hex to write (e.g. 00000000)."); var command = new Command("kill", "Kill partition."); command.SetHandler(CommandHandler.RdbPartKill, sourcePathArgument, partitionNumber, hexBootBytesArgument); @@ -566,7 +566,7 @@ private static Command CreateRdbPartFormat() var volumeNameArgument = new Argument( name: "VolumeName", - description: "Name of the volume (eg. Workbench)."); + description: "Name of the volume (e.g. Workbench)."); var rdbPartFormatCommand = new Command("format", "Format partition."); rdbPartFormatCommand.SetHandler(CommandHandler.RdbPartFormat, pathArgument, partitionNumber, diff --git a/src/Hst.Imager.ConsoleApp/readme.md b/src/Hst.Imager.ConsoleApp/readme.md index 5fead4d..46f24e1 100644 --- a/src/Hst.Imager.ConsoleApp/readme.md +++ b/src/Hst.Imager.ConsoleApp/readme.md @@ -26,7 +26,7 @@ The command line options for the Hst Imager console app are listed in the follow Commands accessing physical drives requires administrator privileges: - Windows: Run `hst.imager` command from Command Prompt started as Administrator. -- macOS and Linux: Run `hst.imager` command from Terminal or shell with sudo, eg. `sudo hst.imager list` to list physical drives. +- macOS and Linux: Run `hst.imager` command from Terminal or shell with sudo, e.g. `sudo hst.imager list` to list physical drives. Hst Imager will only allow access to removeable or USB attached physical drives. @@ -398,7 +398,17 @@ hst.imager rdb fs update 4gb.vhd 1 --path pfs3aio ## Add partition to Rigid Disk Block -Adds a partition to Rigid Disk Block with a defined size. +Adds a partition to Rigid Disk Block with a defined size and following optional options: +- Reserved +- Pre alloc +- Buffers +- Max transfer +- Mask +- No mount +- Bootable +- Priority + +Max transfer and mask can be either integer or hex value, e.g. integer value `130560` or hex value `0x1fe00` for max transfer. Automatically select next available start cylinder. @@ -512,6 +522,8 @@ Updates partition properties in Rigid Disk Block: - Bootable - Priority +Max transfer and mask can be either integer or hex value, e.g. integer value `130560` or hex value `0x1fe00` for max transfer. + Example of displaying usage for updating a partition in Rigid Disk Block: ``` hst.imager rdb part update @@ -525,4 +537,9 @@ hst.imager rdb part update 4gb.vhd 1 --bootable true Example of updating partition number 1 setting max transfer property to 130560 in Rigid Disk Block on a 4GB vhd image file: ``` hst.imager rdb part update 4gb.vhd 1 --max-transfer 130560 +``` + +Example of updating partition number 1 setting max transfer property to hex value 0x1fe00 in Rigid Disk Block on a 4GB vhd image file: +``` +hst.imager rdb part update 4gb.vhd 1 --max-transfer 0x1fe00 ``` \ No newline at end of file diff --git a/src/Hst.Imager.ConsoleApp/usage.md b/src/Hst.Imager.ConsoleApp/usage.md index 0fc7c59..f056752 100644 --- a/src/Hst.Imager.ConsoleApp/usage.md +++ b/src/Hst.Imager.ConsoleApp/usage.md @@ -15,7 +15,7 @@ The command line options for the Hst Imager console app are listed in the follow Commands accessing physical drives requires administrator privileges: - Windows: Run `hst.imager` command from Command Prompt started as Administrator. -- macOS and Linux: Run `hst.imager` command from Terminal or shell with sudo, eg. `sudo hst.imager list` to list physical drives. +- macOS and Linux: Run `hst.imager` command from Terminal or shell with sudo, e.g. `sudo hst.imager list` to list physical drives. Hst Imager will only allow access to removeable or USB attached physical drives.