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
F142697404: D51442.id.diff
Thu, Jan 22, 9:00 AM
Unknown Object (File)
Sun, Jan 18, 8:06 AM
Unknown Object (File)
Wed, Jan 14, 11:43 AM
Unknown Object (File)
Sat, Jan 10, 4:16 PM
Unknown Object (File)
Nov 11 2025, 2:10 PM
Unknown Object (File)
Nov 5 2025, 3:41 AM
Unknown Object (File)
Oct 29 2025, 4:22 AM
Unknown Object (File)
Oct 24 2025, 11:59 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?