NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/41072: dd ignores bs= when if= comes from stdin



>Number:         41072
>Category:       bin
>Synopsis:       dd ignores bs= when if= comes from stdin
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 25 02:50:00 +0000 2009
>Originator:     Perry E. Metzger
>Release:        NetBSD 4.99.28
>Organization:
Perry E. Metzger                perry%piermont.com@localhost
>Environment:
        
        
System: NetBSD snark.cb.piermont.com 4.99.28 NetBSD 4.99.28 (ZWEI) #0: Sun Aug 
12 13:52:43 EDT 2007 
perry%snark.piermont.com@localhost:/usr/src/sys/arch/amd64/compile/ZWEI amd64
Architecture: x86_64
Machine: amd64
>Description:

It appears that dd(1) does not set the obs= value from the bs= value
as documented in the man page if you leave out if= (i.e. if input
comes from stdin.)

>How-To-Repeat:

try

        something.... | dd of=/dev/somepartition bs=10m progress=1

and note that you get way too many dots printed. If you change it to

        something.... | dd of=/dev/somepartition obs=10m progress=1

things suddenly go right.

I suspect this is probably some simple option parsing screw but I
don't have time to look right now.

>Fix:
        

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index