From owner-freebsd-bugs Mon Feb 7 11:43:15 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by builder.freebsd.org (Postfix) with ESMTP id 675603FFE for ; Mon, 7 Feb 2000 11:43:11 -0800 (PST) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.9.3/8.9.3) with ESMTP id LAA00331; Mon, 7 Feb 2000 11:44:04 -0800 Date: Mon, 7 Feb 2000 11:43:56 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Seigo Tanimura Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: i386/14946: rmt - remote magtape protocol In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Upon further examination of the problem, I believe that a much smaller change will be sufficient until we decide (if we decide) move to RMT protocol version 1 from version 0: -------- Index: rmt.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/rmt/rmt.c,v retrieving revision 1.6 diff -u -r1.6 rmt.c --- rmt.c 1999/08/28 01:19:32 1.6 +++ rmt.c 2000/02/07 19:40:34 @@ -184,9 +184,11 @@ 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; } ------- There is no need to change dump or restore because they don't use rmtstatus at all right now. The reason why the above is fine is that for version 0 RMT protocol, the actual contents of the status structure must be undefined (they're binary, after all), so as long as the size is acceptable, it must in fact be 'good' status. Comments? I've tried this for both dump/restore from/to a Solaris 2.7 system and it seems to work. -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message