Skip to content

Commit

Permalink
Release 3.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Oct 30, 2024
1 parent 82bd696 commit 083217f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ I am also the author of the <a href="https://www.hddriver.net">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.<br />
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.<br />
The SCSI2Pi website offers an <a href="https://www.scsi2pi.net/en/piscsi_comparison.html">overview on differences between SCSI2Pi and PiSCSI</a>.
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.
6 changes: 5 additions & 1 deletion cpp/base/primary_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ void PrimaryDevice::RequestSense()

const vector<byte> &buf = GetController()->GetDeviceForLun(effective_lun)->HandleRequestSense();

const auto length = static_cast<int>(min(buf.size(), static_cast<size_t>(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<int>(min(buf.size(), static_cast<size_t>(allocation_length)));
GetController()->CopyToBuffer(buf.data(), length);

// Clear the previous status
Expand Down
6 changes: 6 additions & 0 deletions cpp/controllers/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
11 changes: 10 additions & 1 deletion cpp/s2p/s2p_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,16 @@ int S2p::Run(span<char*> 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;
Expand Down
2 changes: 1 addition & 1 deletion cpp/s2pexec/s2pexec_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ bool S2pExec::ParseArguments(span<char*> args)

optind = 1;
int opt;
while ((opt = getopt_long(static_cast<int>(args.size()), args.data(), "b:B:c:d:f:F:h:i:L:t:T:Hnrvx",
while ((opt = getopt_long(static_cast<int>(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':
Expand Down
2 changes: 1 addition & 1 deletion cpp/shared/s2p_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";

0 comments on commit 083217f

Please sign in to comment.