From gpalmer@mutara.noc.webspan.net  Sat Nov  2 13:33:36 1996
Received: from mutara.noc.webspan.net (gpalmer@mutara.noc.webspan.net [206.154.70.44])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA25222
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 2 Nov 1996 13:30:51 -0800 (PST)
Received: (from gpalmer@localhost) 
          by mutara.noc.webspan.net (8.7.5/8.6.12) id QAA05307;
          Sat, 2 Nov 1996 16:30:01 -0500 (EST)
Message-Id: <199611022130.QAA05307@mutara.noc.webspan.net>
Date: Sat, 2 Nov 1996 16:30:01 -0500 (EST)
From: gpalmer@freebsd.org
Reply-To: gpalmer@freebsd.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: Out of date code/comments in dd
X-Send-Pr-Version: 3.2

>Number:         1945
>Category:       bin
>Synopsis:       Out of date code/comments in dd
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    green
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov  2 13:40:01 PST 1996
>Closed-Date:    Mon Jun 21 17:39:35 PDT 1999
>Last-Modified:  Mon Jun 21 17:40:21 PDT 1999
>Originator:     Gary Palmer
>Release:        FreeBSD 2.2-current i386
>Organization:
Webspan Inc
>Environment:

cvs-cur 2654

>Description:

Code/comments in bin/dd/args.c seem to think that lseek takes an int for
an argument, but it takes an `off_t' argument. There is even (as Bruce
would say) a bogus cast in the code to quiet the compiler.

>How-To-Repeat:

Look at args.c around line 167, and dd.c around lines 230 and 278

>Fix:
	
Bring the code into the modern age and use off_t's like it should.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Sun Apr 26 03:17:19 PDT 1998 
State-Changed-Why:  
Sure thing, now, who makes a patch ? 

From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= )
To: freebsd-gnats-submit@freebsd.org, gpalmer@freebsd.org
Cc:  Subject: Re: bin/1945: Out of date code/comments in dd
Date: 27 Apr 1998 17:14:28 +0200

 One problem is that the code in dd/args.c checks arguments against
 INT_MAX, and you can't fix it without introducing a dependency on the
 definition of off_t which might be invalid on e.g. Alpha or Sparc
 boxen. I suggest that somebody adds OFF_T_MAX to <machine/limits.h>
 and fix dd to check arguments against OFF_T_MAX instead of INT_MAX.
 
 -- 
 Noone else has a .sig like this one.
Responsible-Changed-From-To: freebsd-bugs->green 
Responsible-Changed-By: hoek 
Responsible-Changed-When: Mon Jun 21 12:22:07 PDT 1999 
Responsible-Changed-Why:  
Green's been trying to clean-up the off_t, etc. mess in dd that this PR 
is based on. 
State-Changed-From-To: suspended->closed 
State-Changed-By: green 
State-Changed-When: Mon Jun 21 17:39:35 PDT 1999 
State-Changed-Why:  
This has been fixed by my latest changes. dd(1) should work _much_ more 
properly now, doing 64-bit offsets correctly, and supporting the 'g' 
multiplier. 
>Unformatted:
