Skip to content

Commit

Permalink
Update usage, help and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikstengaard committed Dec 2, 2022
1 parent b2a277e commit 0730f40
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/Hst.Imager.ConsoleApp/MbrCommandFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private static Command CreateMbrPartAdd()

var typeArgument = new Argument<string>(
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<string>(
name: "Size",
Expand Down
40 changes: 20 additions & 20 deletions src/Hst.Imager.ConsoleApp/RdbCommandFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static Command CreateRdbFsAdd()

var dosTypeArgument = new Argument<string>(
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<string>(
new[] { "--name", "-n" },
Expand Down Expand Up @@ -138,7 +138,7 @@ private static Command CreateRdbFsImport()

var dosTypeOption = new Option<string>(
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<string>(
new[] { "--name", "-n" },
Expand Down Expand Up @@ -190,7 +190,7 @@ private static Command CreateRdbFsUpdate()

var dosTypeArgument = new Option<string>(
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<string>(
new[] { "--name", "-n" },
Expand Down Expand Up @@ -236,11 +236,11 @@ private static Command CreateRdbPartAdd()

var dosTypeArgument = new Argument<string>(
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<string>(
name: "Name",
description: "Name of the partition (eg. DH0).");
description: "Name of the partition (e.g. DH0).");

var sizeArgument = new Argument<string>(
name: "Size",
Expand All @@ -260,11 +260,11 @@ private static Command CreateRdbPartAdd()

var maxTransferOption = new Option<string>(
new[] { "--max-transfer", "-mt" },
description: "Set buffers");
description: "Max transfer (integer or hex value e.g. 0x1fe00)");

var maskOption = new Option<string>(
new[] { "--mask", "-ma" },
description: "Mask");
description: "Mask (integer or hex value e.g. 0x7ffffffe)");

var noMountOption = new Option<bool>(
new[] { "--no-mount", "-nm" },
Expand Down Expand Up @@ -336,11 +336,11 @@ private static Command CreateRdbPartUpdate()

var dosTypeOption = new Option<string>(
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<string>(
new[] { "--name", "-n" },
description: "Name of the partition (eg. DH0).");
description: "Name of the partition (e.g. DH0).");

var reservedOption = new Option<int?>(
new[] { "--reserved", "-r" },
Expand All @@ -356,11 +356,11 @@ private static Command CreateRdbPartUpdate()

var maxTransferOption = new Option<string>(
new[] { "--max-transfer", "-mt" },
description: "Max transfer");
description: "Max transfer (integer or hex value e.g. 0x1fe00)");

var maskOption = new Option<string>(
new[] { "--mask", "-ma" },
description: "Mask");
description: "Mask (integer or hex value e.g. 0x7ffffffe)");

var noMountOption = new Option<BoolType?>(
new[] { "--no-mount", "-nm" },
Expand Down Expand Up @@ -453,7 +453,7 @@ private static Command CreateRdbPartCopy()

var nameOption = new Option<string>(
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,
Expand All @@ -478,9 +478,9 @@ private static Command CreateRdbPartExport()

var destinationPathArgument = new Argument<string>(
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);
Expand All @@ -494,19 +494,19 @@ private static Command CreateRdbPartImport()
{
var sourcePathArgument = new Argument<string>(
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<string>(
name: "DestinationPath",
description: "Path to destination physical drive or image file.");

var dosTypeArgument = new Argument<string>(
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<string>(
name: "Name",
description: "Name of the partition (eg. DH0).");
description: "Name of the partition (e.g. DH0).");

var fileSystemBlockSizeOption = new Option<int>(
new[] { "--block-size", "-bs" },
Expand All @@ -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);
Expand All @@ -543,7 +543,7 @@ private static Command CreateRdbPartKill()

var hexBootBytesArgument = new Argument<string>(
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);
Expand All @@ -566,7 +566,7 @@ private static Command CreateRdbPartFormat()

var volumeNameArgument = new Argument<string>(
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,
Expand Down
21 changes: 19 additions & 2 deletions src/Hst.Imager.ConsoleApp/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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
```
2 changes: 1 addition & 1 deletion src/Hst.Imager.ConsoleApp/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 0730f40

Please sign in to comment.