diff --git a/README.md b/README.md
index c8d7e7df..6fb18a09 100644
--- a/README.md
+++ b/README.md
@@ -14,4 +14,4 @@ I am also the author of the HDDRIVER driver s
In the PiSCSI project there was not much interest in replacing old, often buggy or unnecessary code, or to improve the data transfer rates. Long promised features on the roadmap and user requests in tickets were not addressed, and it took long for features or bug fixes to make it into a release. This is why I started to work on the emulation in a separate project, while staying compatible with the PiSCSI web interface. The major part of the PiSCSI C++ codebase has been contributed by me anyway. SCSI2Pi is not meant to completely replace the PiSCSI software, but only the device emulation and the tools.
With PiSCSI there was also not much interest in further developing the SCSI emulation and exploiting the initiator mode feature of the FULLSPEC board. This mode, together with new SCSI2Pi command line tools, offers solutions for use cases that have never been addressed before. These tools also help with advanced testing, making the emulation more robust and reliable.
-The SCSI2Pi website offers an overview on differences between SCSI2Pi and PiSCSI.
+There is no SCSI2Pi support for the X68000 platform, in particular not for the host bridge (SCBR) device. In PiSCSI the respective code has always been in a bad shape, and nobody has been interested in testing it. The other PiSCSI features (and many more) are supported and improved by SCSI2Pi.
diff --git a/cpp/base/primary_device.cpp b/cpp/base/primary_device.cpp
index 75d6723d..9548a434 100644
--- a/cpp/base/primary_device.cpp
+++ b/cpp/base/primary_device.cpp
@@ -190,7 +190,11 @@ void PrimaryDevice::RequestSense()
const vector &buf = GetController()->GetDeviceForLun(effective_lun)->HandleRequestSense();
- const auto length = static_cast(min(buf.size(), static_cast(GetController()->GetCdbByte(4))));
+ int allocation_length = GetController()->GetCdbByte(4);
+ if (!allocation_length && level == scsi_level::scsi_1_ccs) {
+ allocation_length = 4;
+ }
+ const auto length = static_cast(min(buf.size(), static_cast(allocation_length)));
GetController()->CopyToBuffer(buf.data(), length);
// Clear the previous status
diff --git a/cpp/controllers/controller.cpp b/cpp/controllers/controller.cpp
index 1caf0017..853104a0 100644
--- a/cpp/controllers/controller.cpp
+++ b/cpp/controllers/controller.cpp
@@ -136,6 +136,12 @@ void Controller::Command()
return;
}
+ // Linked commands are not supported
+ if (GetCdb()[command_bytes_count - 1] & 0x03) {
+ Error(sense_key::illegal_request, asc::invalid_field_in_cdb);
+ return;
+ }
+
Execute();
}
}
diff --git a/cpp/s2p/s2p_core.cpp b/cpp/s2p/s2p_core.cpp
index c09b8aac..3c372c54 100644
--- a/cpp/s2p/s2p_core.cpp
+++ b/cpp/s2p/s2p_core.cpp
@@ -126,7 +126,16 @@ int S2p::Run(span args, bool in_process)
parser.Banner(false);
bool ignore_conf = false;
- const auto &properties = parser.ParseArguments(args, ignore_conf);
+
+ property_map properties;
+ try {
+ properties = parser.ParseArguments(args, ignore_conf);
+ }
+ catch (const parser_exception &e) {
+ cerr << "Error: " << e.what() << endl;
+ return EXIT_FAILURE;
+ }
+
int port;
if (!ParseProperties(properties, port, ignore_conf)) {
return EXIT_FAILURE;
diff --git a/cpp/s2pexec/s2pexec_core.cpp b/cpp/s2pexec/s2pexec_core.cpp
index 96bef8c5..f32b5144 100644
--- a/cpp/s2pexec/s2pexec_core.cpp
+++ b/cpp/s2pexec/s2pexec_core.cpp
@@ -132,7 +132,7 @@ bool S2pExec::ParseArguments(span args)
optind = 1;
int opt;
- while ((opt = getopt_long(static_cast(args.size()), args.data(), "b:B:c:d:f:F:h:i:L:t:T:Hnrvx",
+ while ((opt = getopt_long(static_cast(args.size()), args.data(), "b:B:c:d:f:F:h:i:o:L:t:T:Hnrvx",
options.data(), nullptr)) != -1) {
switch (opt) {
case 'b':
diff --git a/cpp/shared/s2p_version.cpp b/cpp/shared/s2p_version.cpp
index 01c64de4..0b890f97 100644
--- a/cpp/shared/s2p_version.cpp
+++ b/cpp/shared/s2p_version.cpp
@@ -10,5 +10,5 @@
const int s2p_major_version = 3;
const int s2p_minor_version = 4;
-const int s2p_revision = 2;
+const int s2p_revision = 3;
const std::string s2p_suffix = "";