diff options
author | mjacob <mjacob@FreeBSD.org> | 2000-02-12 01:14:33 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2000-02-12 01:14:33 +0000 |
commit | 344249c99d13a3535f8b3aa987a900725d3babe4 (patch) | |
tree | 78b228ecc6b27a0ea0e39ec63d673bac7adffcb4 /usr.sbin/rmt | |
parent | 2362a3cd13738eb0b2f1de7050a689f54c6956a0 (diff) | |
download | FreeBSD-src-344249c99d13a3535f8b3aa987a900725d3babe4.zip FreeBSD-src-344249c99d13a3535f8b3aa987a900725d3babe4.tar.gz |
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
Diffstat (limited to 'usr.sbin/rmt')
-rw-r--r-- | usr.sbin/rmt/rmt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rmt/rmt.c b/usr.sbin/rmt/rmt.c index 1a536aa..accebc6 100644 --- a/usr.sbin/rmt/rmt.c +++ b/usr.sbin/rmt/rmt.c @@ -184,9 +184,11 @@ top: 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; } |