GNU bug report logs - #7362
dd strangeness

Previous Next

Package: coreutils;

Reported by: Lucia Rotger <lucia <at> aircomp.aero>

Date: Wed, 10 Nov 2010 10:26:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #39 received at 7362 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 7362 <at> debbugs.gnu.org
Subject: Re: bug#7362: dd strangeness
Date: Fri, 25 Feb 2011 12:19:35 +0000
[Message part 1 (text/plain, inline)]
On 02/02/11 13:23, Pádraig Brady wrote:
> This looks like another candidate to auto enable fullblock for.
> https://bugzilla.redhat.com/show_bug.cgi?id=614605
> I.E. oflag=direct

Attached is a proposed solution to this.
I'm worried about the last condition though
where we enable 'fullblock' when both count and bs are specified.

For example this would still work:

# Output first 2 parts
$ (echo part1; sleep 1; echo part2; sleep 1; echo discard) |
  dd count=2 obs=1 2>/dev/null
part1
part2

However this would not:

# Output first 2 parts, each being up to 4096 bytes
$ (echo part1; sleep 1; echo part2; sleep 1; echo discard) |
  dd count=2 ibs=4096 obs=1 2>/dev/null
part1
part2
discard

So how contrived is the last example,
given how brittle such a construct is?

cheers,
Pádraig.
[dd-fullblock.diff (text/x-patch, attachment)]

This bug report was last modified 14 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.