Subject: bin/1896: diff(1) invokes pr(1) with invalid option "-f"
To: None <gnats-bugs@NetBSD.ORG>
From: Greg Earle <earle@netbsd4me.jpl.nasa.gov>
List: netbsd-bugs
Date: 01/05/1996 19:51:54
>Number:         1896
>Category:       bin
>Synopsis:       diff(1) invokes pr(1) with invalid option "-f"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan  5 23:05:02 1996
>Last-Modified:
>Originator:     Greg Earle
>Organization:
JPL
>Release:        1.1
>Environment:
System:	NetBSD scipio.jpl.nasa.gov 1.1 NetBSD 1.1 (GENERICADP) #0: Fri Nov 24 21:18:46 EST 1995     root@boojum.piermont.com:/usr/src/sys/arch/i386/compile/GENERICADP i386

>Description:
	Using the "-l" option to diff(1) causes diff to pipe its output
	through pr(1) to pagenate it.  Sometime between NetBSD 1.0 and 1.1,
	the invocation of "pr" was changed from passing the "-F" option
	(a valid one) to "-f" (an invalid one).  The "pr" subprocess exits
	and the diff fails.
>How-To-Repeat:
	diff -rc -l <file1> <file2> and watch the subsidiary "pr" fail
	with a "Usage:" message.
>Fix:
	There are two instances of "-f" in /usr/src/gnu/usr.bin/diff/util.c;
	change them both back to "-F":

*** /usr/src/gnu/usr.bin/diff/util.c	Fri Oct 13 17:13:37 1995
--- /tmp/util.c	Fri Jan  5 19:52:52 1996
***************
*** 210,212 ****
  
! 	  execl (PR_PROGRAM, PR_PROGRAM, "-f", "-h", name, 0);
  	  pfatal_with_name (PR_PROGRAM);
--- 210,212 ----
  
! 	  execl (PR_PROGRAM, PR_PROGRAM, "-F", "-h", name, 0);
  	  pfatal_with_name (PR_PROGRAM);
***************
*** 224,226 ****
        char const *a = name;
!       sprintf (command, "%s -f -h ", PR_PROGRAM);
        p = command + strlen (command);
--- 224,226 ----
        char const *a = name;
!       sprintf (command, "%s -F -h ", PR_PROGRAM);
        p = command + strlen (command);
>Audit-Trail:
>Unformatted: