Page MenuHomeFreeBSD

Refactor tcopy(1) and teach it about SIMH-TAPFILE format
AbandonedPublic

Authored by phk on Jul 20 2025, 2:57 PM.
Referenced Files
Unknown Object (File)
Thu, Oct 9, 10:01 PM
Unknown Object (File)
Fri, Sep 26, 12:39 PM
Unknown Object (File)
Fri, Sep 26, 12:26 PM
Unknown Object (File)
Sep 2 2025, 6:07 AM
Unknown Object (File)
Aug 30 2025, 8:52 AM
Unknown Object (File)
Jul 29 2025, 4:15 AM
Unknown Object (File)
Jul 29 2025, 2:03 AM
Unknown Object (File)
Jul 28 2025, 5:14 PM
Subscribers

Details

Reviewers
ken
scottl
gibbs
Summary

This is a refactoring of tcopy(1) to make it (also) understand SIMH-TAPFILE format.

I think I have retained all previous behaviour correctly.

The EXAMPLES section show a couple of the things one can use the SIMH-TAPFILE support for.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

phk requested review of this revision.Jul 20 2025, 2:57 PM

i'm not a simh-tapefile expert, so I've not verified that this implements that standard.
I do like the cleanup generally and have only a few questions / suggestions.

usr.bin/tcopy/tcopy.c
143

the above looks like it should be its own function, just called from here since it handles a completely different case than parsing the SIMH-TAPEFILE format.

175

This code deals poorly with truncated return results, though it would be rare to get partial reads AND not be at EOF, so it just affects the quality of the error messages.

203

Same comment as tape_dev_read

235

Here the order is reversed from tape_dev_{read,write}. Is that intentional?

May we omit the prompt characters in the examples section of tcopy.1 for copy paste?

usr.bin/tcopy/tcopy.1
93

If we mark it up as Pa, then people can find this page with apropos Pa=sa

112
123

Should we use the opensimh repo instead because of the licensing fiasco?