Minimum necessary change: return no more than 24 bytes of data for the

'S' status call- this was the size of the original mtget structure. Don't
bother to map the current mtget structure to an old one- for version 0
RMT it's meaningless because it's all binary data anyway, and it's only the
wierd edge case of Solaris 7 starting to use the 'S' status call that has
tickled this issue- and this MNC fixes that issue.

We need to implement Version 1 RMT anyway.

Approved: jkh@freebsd.org

PR:		14946
This commit is contained in:
mjacob 2000-02-12 01:14:33 +00:00
parent 971b7734ba
commit cca44dc1ac

View File

@ -184,9 +184,11 @@ main(argc, argv)
if (ioctl(tape, MTIOCGET, (char *)&mtget) < 0)
goto ioerror;
rval = sizeof (mtget);
if (rval > 24) /* original mtget structure size */
rval = 24;
(void)sprintf(resp, "A%d\n", rval);
(void)write(1, resp, strlen(resp));
(void)write(1, (char *)&mtget, sizeof (mtget));
(void)write(1, (char *)&mtget, rval);
goto top;
}