mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-29 16:49:55 +00:00
ddeede2beb
Summary ov most important changes triggered by the SASI code removal: - Removed the SASI controller code - New controller management. There is a new controller base class AbstractController and a class ControllerManager managing the controller lifecycle. The lifecycle management was removed from rasci.cpp and is covered by unit tests. - New device management. The DeviceFactory manages the device lifecycle instead of rascsi.cpp. The new code is covered by unit tests. - The lifecycle managment uses C++ collections with variable size instead of arrays with hard-coded sizes. - The ScsiController method contains most of what was previously contained in scsidev_ctrl.cpp plus the code from sasidev_ctrl.cpp that was relevant for SCSI. - scsi_command_util contains helper methods used for identical SCSI command implementations of more than one device - Devices know their controllers, so that the controller instance does not need to be passed to each SCSI command. This change helps to decouple the devices from the controller. The phase_handler interface is also part of this decoupling. - Use scsi_command_exception for propagating SCSI command execution errors, This resolves issues with the previous error handling, which was based on return values and often on magic numbers. - Removed legacy SCSI error codes, all errors are now encoded by sense_key::, asc:: and status::. - Fixed various warnings reported with -Wextra, -Weffc++ and -Wpedantic. - Use constructor member initialization lists (recommended for ISO C++) - Consistently use new/delete instead of malloc/free (recommended for ISO C++), resulting in better type safety and error handling - Replaced variable sized arrays on the stack (violates ISO C++ and can cause a stack overflow) - Replaced NULL by nullptr (recommended for C++), resulting in better type safety - Use more const member functions in order to avoid side effects - The format device page can now also be changed for hard disk drives (Fujitsu M2624S supports this, for instance), not just for MOs. - Better encapsulation, updated access specifiers in many places - Removed unused methods and method arguments - Fixed a number of TODOs - Added/updated unit tests for a lot of non-legacy classes - Makefile support for creating HTML coverage reports with lcov/genhtml
170 lines
6.5 KiB
Plaintext
170 lines
6.5 KiB
Plaintext
!! ------ THIS FILE IS AUTO_GENERATED! DO NOT MANUALLY UPDATE!!!
|
||
!! ------ The native file is rasctl.1. Re-run 'make docs' after updating\n\n
|
||
rascsi(1) General Commands Manual rascsi(1)
|
||
|
||
NAME
|
||
rasctl - Sends management commands to the rascsi process
|
||
|
||
SYNOPSIS
|
||
rasctl -e | -l | -m | -o | -s | -v | -D | -I | -L | -O | -P | -T | -V |
|
||
-X | [-C FILENAME:FILESIZE] [-E FILENAME] [-F IMAGE_FOLDER] [-R CUR‐
|
||
RENT_NAME:NEW_NAME] [-c CMD] [-f FILE|PARAM] [-g LOG_LEVEL] [-h HOST]
|
||
[-i ID [-n NAME] [-p PORT] [-r RESERVED_IDS] [-t TYPE] [-u UNIT] [-x
|
||
CURRENT_NAME:NEW_NAME] [-z LOCALE]
|
||
|
||
DESCRIPTION
|
||
rasctl Sends commands to the rascsi process to make configuration ad‐
|
||
justments at runtime or to check the status of the devices.
|
||
|
||
Either the -i or -l option should be specified at one time. Not both.
|
||
|
||
You do NOT need root privileges to use rasctl.
|
||
|
||
Note: The command and type arguments are case insensitive. Only the
|
||
first letter of the command/type is evaluated by the tool.
|
||
|
||
OPTIONS
|
||
-C FILENAME:FILESIZE
|
||
Create an image file in the default image folder with the speci‐
|
||
fied name and size in bytes.
|
||
|
||
-D Detach all devices.
|
||
|
||
-E FILENAME
|
||
Display information on an image file.
|
||
|
||
-F IMAGE_FOLDER
|
||
Set the default image folder.
|
||
|
||
-I Gets the list of reserved device IDs.
|
||
|
||
-L LOG_LEVEL
|
||
Set the rascsi log level (trace, debug, info, warn, err, criti‐
|
||
cal, off).
|
||
|
||
-h HOST
|
||
The rascsi host to connect to, default is 'localhost'.
|
||
|
||
-e List all images files in the default image folder.
|
||
|
||
-N Lists all available network interfaces provided that they are
|
||
up.
|
||
|
||
-O Display the available rascsi server log levels and the current
|
||
log level.
|
||
|
||
-P Prompt for the access token in case rascsi requires authentica‐
|
||
tion.
|
||
|
||
-l List all of the devices that are currently being emulated by
|
||
RaSCSI, as well as their current status.
|
||
|
||
-m List all file extensions recognized by RaSCSI and the device
|
||
types they map to.
|
||
|
||
-o Display operation meta data information.
|
||
|
||
-R CURRENT_NAME:NEW_NAME
|
||
Rename an image file in the default image folder.
|
||
|
||
-p PORT
|
||
The rascsi port to connect to, default is 6868.
|
||
|
||
-r RESERVED_IDS
|
||
Comma-separated list of IDs to reserve. Pass an empty list in
|
||
order to not reserve anything.
|
||
|
||
-s Display server-side settings like available images or supported
|
||
device types.
|
||
|
||
-T Display all device types and their properties.
|
||
|
||
-v Display the rascsi server version.
|
||
|
||
-V Display the rasctl version.
|
||
|
||
-X Shut down the rascsi process.
|
||
|
||
-d FILENAME
|
||
Delete an image file in the default image folder.
|
||
|
||
-x CURRENT_NAME:NEW_NAME
|
||
Copy an image file in the default image folder.
|
||
|
||
-z LOCALE
|
||
Overrides the default locale for client-facing error messages.
|
||
|
||
-i ID ID is the SCSI ID that you want to control. (0-7)
|
||
|
||
-c CMD Command is the operation being requested. Options are:
|
||
a(ttach): Attach disk
|
||
d(etach): Detach disk
|
||
i(nsert): Insert media (removable media devices only)
|
||
e(ject): Eject media (removable media devices only)
|
||
p(rotect): Write protect the medium (not for CD-ROMs, which
|
||
are always read-only)
|
||
u(nprotect): Remove write protection from the medium (not for
|
||
CD-ROMs, which are always read-only)
|
||
s(how): Display device information
|
||
|
||
eject, protect and unprotect are idempotent.
|
||
|
||
-b BLOCK_SIZE
|
||
The optional block size, either 512, 1024, 2048 or 4096 bytes.
|
||
The default size is 512 bytes.
|
||
|
||
-f FILE|PARAM
|
||
Device-specific: Either a path to a disk image file, or a param‐
|
||
eter for a non-disk device. See the rascsi(1) man page for per‐
|
||
mitted file types.
|
||
|
||
-t TYPE
|
||
Specifies the device type. This type overrides the type derived
|
||
from the file extension of the specified image. See the
|
||
rascsi(1) man page for the available device types. For some
|
||
types there are shortcuts (only the first letter is required):
|
||
hd: SCSI hard disk drive
|
||
rm: SCSI removable media drive
|
||
cd: CD-ROM
|
||
mo: Magneto-Optical disk
|
||
lp: SCSI printer
|
||
bridge: Bridge device (Only applicable to the Sharp X68000)
|
||
daynaport: DaynaPort network adapter
|
||
services: Host services device
|
||
|
||
-n VENDOR:PRODUCT:REVISION
|
||
The vendor, product and revision for the device, to be returned
|
||
with the INQUIRY data. A complete set of name components must be
|
||
provided. VENDOR may have up to 8, PRODUCT up to 16, REVISION up
|
||
to 4 characters. Padding with blanks to the maxium length is au‐
|
||
tomatically applied. Once set the name of a device cannot be
|
||
changed.
|
||
|
||
-u UNIT
|
||
Unit number (0-31). This will default to 0. This option is only
|
||
used when there are multiple SCSI devices on a shared SCSI con‐
|
||
troller. (This is not common)
|
||
|
||
EXAMPLES
|
||
Show a listing of all of the SCSI devices and their current status.
|
||
rasctl -l
|
||
|
||
Example output:
|
||
+----+-----+------+-------------------------------------
|
||
| ID | LUN | TYPE | IMAGE FILE
|
||
+----+-----+------+-------------------------------------
|
||
| 0 | 1 | SCHD | /home/pi/harddisk.hda
|
||
+----+-----+------+-------------------------------------
|
||
|
||
Request the RaSCSI process to attach a disk (assumed) to SCSI ID 0 with
|
||
the contents of the file system image "HDIIMAGE0.HDS".
|
||
rasctl -i 0 -f HDIIMAGE0.HDS
|
||
|
||
SEE ALSO
|
||
rascsi(1), scsimon(1), rasdump(1), sasidump(1)
|
||
|
||
Full documentation is available at:
|
||
<https://www.github.com/akuker/RASCSI/wiki/>
|
||
|
||
rascsi(1)
|