Skip to content

Add device type shorthand for Tape, default generic INQUIRE string#1535

Merged
rdmark merged 3 commits intodevelopfrom
rdmark-device-shorthand
Nov 10, 2025
Merged

Add device type shorthand for Tape, default generic INQUIRE string#1535
rdmark merged 3 commits intodevelopfrom
rdmark-device-shorthand

Conversation

@rdmark
Copy link
Copy Markdown
Member

@rdmark rdmark commented Nov 8, 2025

The scsictl command parser looks for single letter shorthands for each device type; this adds 't' for SCTP and changes SCLP to 'p'

Now you can do '-t tape' and '-t printer' for an easy to remember command

Also moves the SCTP default product/vendor into the device factory, updates the unit tests, and an overhauls the man pages

Additionally, in a separate commit, add section for tape drives to the Web UI drives page, and fix some issues with the drive properties

@rdmark rdmark marked this pull request as ready for review November 8, 2025 22:11
@rdmark rdmark requested a review from akuker as a code owner November 8, 2025 22:11
@rdmark rdmark requested a review from nucleogenic November 8, 2025 22:12
Copy link
Copy Markdown
Contributor

@stinkerton18 stinkerton18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, code/comments are sane and clear. Device parse list is more clear and logical.

@rdmark rdmark force-pushed the rdmark-device-shorthand branch 3 times, most recently from 34a4b70 to 774b7ed Compare November 9, 2025 08:44
The scsictl command parser looks for single letter shorthands for each device type;
this adds 't' for SCTP and changes SCLP to 'p'

Now you can do '-t tape' and '-t printer' for an easy to remember command

Also moves the SCTP default product/vendor into the device factory,
updates the unit tests, and an overhauls the man pages
@rdmark rdmark force-pushed the rdmark-device-shorthand branch 2 times, most recently from 7f277b0 to f3f9f8d Compare November 9, 2025 09:17
@rdmark
Copy link
Copy Markdown
Member Author

rdmark commented Nov 9, 2025

@bog-dan-ro FYI while testing I found a range of minor bugs and improvements to SCTP adjacent code.

Interesting to note is that piscsi will masquerade as Tandberg by default, while scsi2pi won't (if I read the code correctly)

@bog-dan-ro
Copy link
Copy Markdown
Contributor

@rdmark thanks a lot for checking it!
I choose "Tandberg" as it was by far the most popular tape driver... I don't know why s2p doesn't do it.
As I said I tested the implementation on my Altos 386 series 1000 . I could use it to read .tar/.tap files with no problems.

@rdmark
Copy link
Copy Markdown
Member Author

rdmark commented Nov 9, 2025

@bog-dan-ro there is value in using a generic default that’s not spoofing a vendor, since it allows us to follow an industry standard specification as baseline rather that trying to emulate that specific vendor’s proprietary extensions and so on.

In scsi2pi they use “SCSI TAPE” as the default product for the Tape device. Have you tested if vendor=“PiSCSi” and product=“SCSI TAPE” works in your setup?

@bog-dan-ro
Copy link
Copy Markdown
Contributor

@rdmark nope I didn't test it. Right now I can't test it as my PSU is broken. Once I fix it, I can test it again.

@bog-dan-ro
Copy link
Copy Markdown
Contributor

bog-dan-ro commented Nov 9, 2025

@rdmark if I can choose Tandberg after I choose the image type, then you can use a generic one.

@rdmark rdmark changed the title Add device type shorthand 't' for Tape, and change printer to 'p' Add device type shorthand for Tape, default generic INQUIRE string Nov 9, 2025
@rdmark
Copy link
Copy Markdown
Member Author

rdmark commented Nov 9, 2025

@bog-dan-ro Yes you can absolutely attach a SCTP device masquerading as any Tandberg using either scsictl or the Web UI. For the latter case, here is where you can do it. Note that I added two more Tandberg devices to the json file to give some more handy options.

Screenshot 2025-11-09 at 18 25 05

The tape drives need their own section in the Jinja2 template

Also fixes a bug where the drive properties define a block size,
which is illegal for a SCTP device

One more fix: Filter tap/tar image files for the attach UI
@rdmark rdmark force-pushed the rdmark-device-shorthand branch from 340143b to 6d4e76d Compare November 9, 2025 17:39
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Nov 9, 2025

@rdmark rdmark merged commit c642592 into develop Nov 10, 2025
15 checks passed
@rdmark rdmark deleted the rdmark-device-shorthand branch November 10, 2025 18:52
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.

3 participants