From 1181166479f292b721d7596c0e9bdf63b179786a Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Wed, 15 Nov 2023 18:18:01 +0100 Subject: [PATCH] Add manpage --- cpp/scsiexec/scsisexec_core.cpp | 4 ++-- doc/scsidump.1 | 2 +- doc/scsidump_man_page.txt | 2 +- doc/scsiexec.1 | 42 +++++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 doc/scsiexec.1 diff --git a/cpp/scsiexec/scsisexec_core.cpp b/cpp/scsiexec/scsisexec_core.cpp index f0a7b598..537416ab 100644 --- a/cpp/scsiexec/scsisexec_core.cpp +++ b/cpp/scsiexec/scsisexec_core.cpp @@ -43,10 +43,10 @@ void ScsiExec::TerminationHandler(int) bool ScsiExec::Banner(span args) const { - cout << piscsi_util::Banner("(SCSI Action Execution Utility)"); + cout << piscsi_util::Banner("(SCSI Action Execution Tool)"); if (args.size() < 2 || string(args[1]) == "-h" || string(args[1]) == "--help") { - cout << "Usage: " << args[0] << " -t ID[:LUN] [-i BID] -f FILENAME [-L log_level] [-b] \n" + cout << "Usage: " << args[0] << " -t ID[:LUN] [-i BID] -f FILE [-L log_level] [-b] \n" << " ID is the target device ID (0-" << (ControllerManager::GetScsiIdMax() - 1) << ").\n" << " LUN is the optional target device LUN (0-" << (ControllerManager::GetScsiLunMax() - 1) << ")." << " Default is 0.\n" diff --git a/doc/scsidump.1 b/doc/scsidump.1 index 4ec16147..a5f56e20 100644 --- a/doc/scsidump.1 +++ b/doc/scsidump.1 @@ -66,6 +66,6 @@ Launch scsidump to restore/upload a drive image from the local file system to SC scsidump -r -t 0 -f ./outimage.hda -s 1048576 .SH SEE ALSO -scsictl(1), piscsi(1), scsimon(1) +scsictl(1), piscsi(1), scsiexec(1), scsimon(1) Full documentation is available at: diff --git a/doc/scsidump_man_page.txt b/doc/scsidump_man_page.txt index 70d63389..7ae59664 100644 --- a/doc/scsidump_man_page.txt +++ b/doc/scsidump_man_page.txt @@ -76,7 +76,7 @@ EXAMPLES scsidump -r -t 0 -f ./outimage.hda -s 1048576 SEE ALSO - scsictl(1), piscsi(1), scsimon(1) + scsictl(1), piscsi(1), scsiexec(1), scsimon(1) Full documentation is available at: diff --git a/doc/scsiexec.1 b/doc/scsiexec.1 new file mode 100644 index 00000000..0e43892e --- /dev/null +++ b/doc/scsiexec.1 @@ -0,0 +1,42 @@ +.TH scsidump 1 +.SH NAME +scsidump \- SCSI action execution tool for PiSCSI +.SH SYNOPSIS +.B scsidump +\fB\-t\fR \fIID[:LUN]\fR +[\fB\-i\fR \fIBID\fR] +\fB\-f\fR \fIFILENAME\fR +[\fB\-b\fR] +[\fB\-t\tR] ID[:LUN] +[\fB\-L\fR \fILOG_LEVEL\fR] +.SH DESCRIPTION +.B scsiexec +wraps JSON or binary input data in protobuf format into a custom PiSCSI SCSI command, has piscsi execute it and display the results in JSON format. The input data must be legal commands for the PiSCSi protobuf interface. See the file piscsi_interface.proto for details. +scsiexec helps with advanced testing. It requires two connected PiSCSI boards. + +.SH NOTES + +.B scsidump +requires either a direct connection (one without transceivers) or a FULLSPEC PiSCSI/RaSCSI board. + +.SH OPTIONS +.TP +.BR \-t\fI " "\fIID[:LUN] +SCSI ID and optional LUN of the remote SCSI device. The remote SCSI device will be functioning as the "Target" device. +.TP +.BR \-i\fI " "\fIBID +SCSI ID of the PiSCSI device. If not specified, the PiSCSI device will use ID 7. The PiSCSI host will be functioning as the "Initiator" device. +.TP +.BR \-f\fI " "\fIFILE +Path to the input file with JSON or binary protobuf data. +.TP +.BR \-b\fI +Signals that the inout file is a binary file and not a JSON file. +.TP +.BR \-L\fI " " \fILOG_LEVEL +The scsiexec log level (trace, debug, info, warning, error, off). The default log level is 'info'. + +.SH SEE ALSO +scsictl(1), piscsi(1), scsidump(1), scsimon(1) + +Full documentation is available at: