bug#13391: dd silently ignores lseek error

2013-01-17 Thread Pádraig Brady
On 01/09/2013 10:08 AM, Pádraig Brady wrote: On 01/09/2013 07:36 AM, Bernhard Voelker wrote: why not check input_seekable where it is set - ~60 lines above? I was trying to keep related code together. Thanks for all the reviews, which I've fixed locally. To provide an argument for why this

bug#13391: dd silently ignores lseek error

2013-01-09 Thread Pádraig Brady
On 01/09/2013 07:36 AM, Bernhard Voelker wrote: why not check input_seekable where it is set - ~60 lines above? I was trying to keep related code together. Thanks for all the reviews, which I've fixed locally. To provide an argument for why this shouldn't go in, the following is equivalent:

bug#13391: dd silently ignores lseek error

2013-01-09 Thread Philip Rowlands
From ea524ab7388bb35e591dcdb0fc7f7989d61143ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 9 Jan 2013 00:42:38 + Subject: [PATCH] dd: add [io]flag=seekable to verify file support for lseek * src/dd.c: Add the new O_SEEKABLE flag. (main): Verify leek() works if O

bug#13391: dd silently ignores lseek error

2013-01-08 Thread Bernhard Voelker
On 01/09/2013 02:14 AM, Pádraig Brady wrote: > I had a look around for a tool to verify > that a file/device supports the seek operation > and couldn't find one. > So this seems like useful functionality. > Worth applying the attached? > * cfg.mk (sc_dd_O_FLAGS): Add O_SEEKABLE to the list of pr

bug#13391: dd silently ignores lseek error

2013-01-08 Thread Erik Auerswald
Hi, On Wed, Jan 09, 2013 at 01:14:22AM +, Pádraig Brady wrote: > On 01/08/2013 08:55 PM, Paul Eggert wrote: >> On 01/08/13 10:11, Neil Klopfenstein wrote: >>> Note that it begins reading at the _beginning of the ar file_ -- the 'skip' >>> argument has failed silently. >> >> But the 'skip' hasn

bug#13391: dd silently ignores lseek error

2013-01-08 Thread Paul Eggert
On 01/08/2013 05:14 PM, Pádraig Brady wrote: > Worth applying the attached? Looks good, except I would avoid calling lseek on STDOUT_FILENO unless oflag=seekable is set. Just being conservative: the effect of lseek on unseekable files is implementation-defined.

bug#13391: dd silently ignores lseek error

2013-01-08 Thread Pádraig Brady
On 01/08/2013 08:55 PM, Paul Eggert wrote: On 01/08/13 10:11, Neil Klopfenstein wrote: Note that it begins reading at the _beginning of the ar file_ -- the 'skip' argument has failed silently. But the 'skip' hasn't failed. It's merely being implemented via 'read' rather than via 'lseek'. The

bug#13391: dd silently ignores lseek error

2013-01-08 Thread Paul Eggert
On 01/08/13 10:11, Neil Klopfenstein wrote: > Note that it begins reading at the _beginning of the ar file_ -- the 'skip' > argument has failed silently. But the 'skip' hasn't failed. It's merely being implemented via 'read' rather than via 'lseek'. The records are being skipped correctly. It m

bug#13391: dd silently ignores lseek error

2013-01-08 Thread Neil Klopfenstein
Hi all, While trying to diagnose a weird filesystem bug, I found an error in GNU dd v8.12. The weird bug is causing lseek() to fail improperly. That's not the problem I'm reporting, though. I was trying to use dd to demonstrate the lseek error to my sysadmin. Instead, I found that dd is ignoring