Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!agate!apple!bridge2!csi!nsc!voder!wlbr!wlv.imsd.contel.com!sms
From: sms@wlv.imsd.contel.com (Steven M. Schultz)
Newsgroups: comp.bugs.2bsd
Subject: tcopy muffs arg count check
Message-ID: <34859@wlbr.IMSD.CONTEL.COM>
Date: 11 Aug 89 04:45:59 GMT
Sender: news@wlbr.IMSD.CONTEL.COM
Reply-To: sms@wlv.imsd.contel.com (Steven M. Schultz)
Organization: Contel Federal Systems
Lines: 45

Subject: tcopy muffs arg count check
Index:	ucb/tcopy.c 2.10BSD

Description:
	tcopy complains if you attempt to copy a tape to a file, i.e. by
	giving a second argument.

Repeat-By:
	try:
		tcopy /dev/rmt0 /tmp/junk

	note the complaint about argument usage:

	Usage: tcopy src [dest]

	using tcopy to examine a tape:

		tcopy /dev/rmt0
	
	works fine.

Fix:
	I thought this had made it in to the distribution, apparently not.

	Apply the patch below.

*** tcopy.c.old	Thu Mar 12 01:42:31 1987
--- tcopy.c	Thu Aug 10 15:21:52 1989
***************
*** 44,50 ****
  	register n, nw, inp, outp;
  	struct mtop op;
  
! 	if (argc <=1 || argc >= 3) {
  		fprintf(stderr, "Usage: tcopy src [dest]\n");
  		exit(1);
  	}
--- 44,50 ----
  	register n, nw, inp, outp;
  	struct mtop op;
  
! 	if (argc <=1 || argc > 3) {
  		fprintf(stderr, "Usage: tcopy src [dest]\n");
  		exit(1);
  	}