mirror of
https://github.com/prirun/p50em.git
synced 2026-04-02 19:40:10 +00:00
Add mt option to return 2-word zero record instead of error status, to
test how magrst behaves. It treats this just like a real tape error, which is good. If mtwrite is used to re-create a physical tape from a .tap file, it cannot re-create tape errors, so writes a 4-byte zero record instead. Prime magrst will still see this as an error record since it isn't long enough to be a real magsav record.
This commit is contained in:
5
emdev.h
5
emdev.h
@@ -755,8 +755,13 @@ fmterr:
|
||||
if (reclen & 0x80000000) { /* record marked in error */
|
||||
/* XXX: can .tap have non-zero record length here? */
|
||||
fprintf(stderr,"tape read error at position %lld\n", lseek(fd, 0, SEEK_CUR));
|
||||
#if 1
|
||||
*mtstat |= 0xB600; /* set all error bits */;
|
||||
return 0;
|
||||
#else
|
||||
*(int *)iobuf = 0; /* return a 2-word zero record on errors */
|
||||
return 2;
|
||||
#endif
|
||||
}
|
||||
if (reclen & 1)
|
||||
warn("odd-length record in tape file!");
|
||||
|
||||
Reference in New Issue
Block a user