From keramida@diogenis.ceid.upatras.gr  Wed Feb 16 14:42:24 2000
Return-Path: <keramida@diogenis.ceid.upatras.gr>
Received: from builder.freebsd.org (builder.FreeBSD.ORG [204.216.27.24])
	by hub.freebsd.org (Postfix) with ESMTP id 21FDB37B592
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Feb 2000 14:42:24 -0800 (PST)
	(envelope-from keramida@diogenis.ceid.upatras.gr)
Received: from mx2.x-treme.gr (mx2.x-treme.gr [212.120.192.15])
	by builder.freebsd.org (Postfix) with ESMTP id 2C6BE132F5
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Feb 2000 14:41:43 -0800 (PST)
Received: from hades.hell.gr (pat28.x-treme.gr [212.120.197.220])
	by mx2.x-treme.gr (8.9.3/8.9.3/IPNG-ADV-ANTISPAM-0.1) with SMTP id AAA28427
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 17 Feb 2000 00:42:10 +0200
Received: (qmail 7550 invoked by uid 1001); 16 Feb 2000 12:59:13 -0000
Message-Id: <20000216125913.7549.qmail@hades.hell.gr>
Date: 16 Feb 2000 12:59:13 -0000
From: keramida@ceid.upatras.gr
Sender: keramida@diogenis.ceid.upatras.gr
Reply-To: keramida@ceid.upatras.gr
To: FreeBSD-gnats-submit@freebsd.org
Subject: dd.1 manpage and dd behavior mismatch
X-Send-Pr-Version: 3.2

>Number:         16750
>Category:       docs
>Synopsis:       dd.1 manpage and dd behavior mismatch
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 16 15:30:02 PST 2000
>Closed-Date:    Thu Feb 17 20:37:16 PST 2000
>Last-Modified:  Thu Feb 17 20:56:03 PST 2000
>Originator:     Giorgos Keramidas <keramida@ceid.upatras.gr>
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:

	(( uname ))
        FreeBSD hades.hell.gr 4.0-CURRENT FreeBSD
        4.0-CURRENT #0: Wed Feb 16 03:08:14 EET 2000
        toor@hades.hell.gr:/usr/src/sys/compile/HADES i386

>Description:

	The manpage of dd(1) states incorrectly that:

        "Where sizes are specified, a decimal number of bytes is expected."

        But dd can accept octals and hexadecimals too, like 011 or 0xa,
        and work as expected.  It even works correctly with hexadecimals
        separated by 'x' to indicate multiplication!

>How-To-Repeat:

	#  transferring 10 bytes with octal numbers
	dd if=/dev/zero of=/dev/null bs=1 count=012
	dd if=/dev/zero of=/dev/null bs=012 count=1
	# transferring 10 bytes with hexadecimal numbers
	dd if=/dev/zero of=/dev/null bs=0xa count=1
	dd if=/dev/zero of=/dev/null bs=1 count=0xa
	# hexadecimals and 'x' for multiplication
	dd if=/dev/zero of=/dev/null bs=1x0xa count=1
	dd if=/dev/zero of=/dev/null bs=1 count=1x0xa

>Fix:

--- src/bin/dd.1.orig   Sat Aug 28 02:14:03 1999
+++ src/bin/dd.1        Wed Feb 16 14:53:52 2000
@@ -282,7 +282,8 @@
 .El
 .El
 .Pp
-Where sizes are specified, a decimal number of bytes is expected.
+Where sizes are specified, a decimal, octal, or hexadecimal number of
+bytes is expected.
 If the number ends with a ``b'', ``k'', ``m'', ``g'',  or ``w'', the
 number is multiplied by 512, 1024 (1K), 1048576 (1M), 1073741824 (1G)
 or the number of bytes in an integer, respectively.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-doc 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Thu Feb 17 20:18:09 PST 2000 
Responsible-Changed-Why:  
Misfiled PR 
State-Changed-From-To: open->closed 
State-Changed-By: gsutter 
State-Changed-When: Thu Feb 17 20:37:16 PST 2000 
State-Changed-Why:  
Committed, thanks! 
>Unformatted:
