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:
Matt Jacob 2000-02-12 01:14:33 +00:00
parent 327a542d35
commit f08566c3cf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57155

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;
}