GNU bug report logs - #8294
Minor nit with dd

Previous Next

Package: coreutils;

Reported by: John Morris <jmorris <at> beau.org>

Date: Sat, 19 Mar 2011 18:27:01 UTC

Severity: normal

Tags: moreinfo

Done: era eriksson <era <at> iki.fi>

Bug is archived. No further changes may be made.

Full log


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

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: John Morris <jmorris <at> beau.org>, 8294 <at> debbugs.gnu.org
Subject: Re: bug#8294: Minor nit with dd
Date: Sun, 17 Apr 2011 09:05:52 +0200
tags 8294 moreinfo
close 8294
thanks

Paul Eggert wrote:
> On 03/19/2011 11:26 AM, John Morris wrote:
>> On a 64bit platform shouldn't the following command have done the
>> expected thing instead of quietly clipping to 231?
>
> It depends on what your platform's 64-bit 'read'
> system call does.  My guess is that your platform's
> 'read' syscall refuses to read more than
> 2**31 - 2**12 bytes at a time from /dev/zero,
> so the problem (if any :-) is with 'read', not
> with 'dd'.

Thanks for replying, Paul.

John,
If the read system call were failing and dd were ignoring that failure,
that would be a bug.  However, dd is careful to check for that sort of
thing.  Here, read is returning after readling less than a full block,
and that's fine.  It's a so-called short read.  If you want dd to
accumulate full blocks, use GNU dd's iflag=fullblock option.




This bug report was last modified 12 years and 266 days ago.

Previous Next


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