bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: dd blocks/bytes at a time


From: Jim Meyering
Subject: Re: [PATCH] Re: dd blocks/bytes at a time
Date: Thu, 21 Dec 2006 20:15:15 +0100

Paul Eggert <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>
>> Andreas Schwab <address@hidden> wrote:
>>> But only the preceding ones.
>>
>> True.  Thanks.
>
> Wait a minute -- POSIX says bs= should override all ibs= and obs=
> operands (not just preceding ones), and traditional dd conforms to
> POSIX here.  So the GNU documentation was right and the behavior
> wrong.
>
> Here's a patch.
>
> 2006-12-21  Paul Eggert  <address@hidden>
>
>       * NEWS: dd bs= operands now silently override later ibs= and obs=,
>       as POSIX requires.
>       * src/dd.c (scanargs): Implement it.
>       * tests/dd/misc (outbytes): Test it.
>       * doc/coreutils.texi (dd invocation): Specify that bs=N
>       overrides later ibs and obs, undoing part of the
>       previous change.  (The behavior was wrong.)

Whoa.  Good catch.
I see that both freebsd6 and netbsd1.6 disallow the usage in
your test case:

  netbsd$ echo x | /bin/dd bs=3 ibs=10 obs=10 conv=sync | wc -c
  dd: ibs: illegal argument combination or already set
  0

Solaris 10 does what you propose.
Can anyone check other implementations?

I'm beginning to think GNU dd should at least warn about
the portability problem.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]