Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for scsi commands with no data. #12

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

ZakDanger
Copy link
Contributor

Currently there is only support for scsi commands that either send or receive data, but some commands do not send or receive any data. I added support for these "no data" commands. A common example is the "Test Unit Ready" scsi comand, which is 6 bytes of all 00. The result of this command is gotten from the sense data bytes.

https://docs.oracle.com/en/storage/tape-storage/sl4000/slksr/test-unit-ready-00h.html

I succesfully tested the windows version of these changes but did not test the linux version.

Since no data is sent I would expect to pass "None" for the "data" parameter in the SCSIDevice::issue_command() methods. So I added checks for None and create an empty data buffer inside the method. I wasn't sure if I should add "None" in the parameter specification here: "data: Union[ctypes.Array, ctypes.Structure],"

@TkTech TkTech merged commit ab84291 into TkTech:main Jun 7, 2024
@TkTech
Copy link
Owner

TkTech commented Jun 7, 2024

Looks good 👍 , changes work fine on Linux. I need to start putting together a manual test set for each platform and interface pair.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants