bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] dd - support for reading of full blocks


From: Pádraig Brady
Subject: Re: [PATCH] dd - support for reading of full blocks
Date: Fri, 18 Jul 2008 09:59:12 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Paul Eggert wrote:
> Pádraig Brady <address@hidden> writes:
> 
>> or conv=wait, though I do have a strong preference
>> for iflag=block as it's the most accurate.
> 
> I dunno, iflag= is supposed to be symmetric with oflag=.

Well there is no harm in having that oflag as well
to handle short writes, even though it's probably redundant.

> This "feels" more like a conversion, so conv= seems more
> appropriate.

Hmm, there is no obvious right option for me given
the current syntax of dd.
To me, conv should mean that the data is actually
changed in some way. Unfortunately that doesn't seem
to be the case currently as we have the following
conversions which actually modify the data:

ascii   from EBCDIC to ASCII
ebcdic  from ASCII to EBCDIC
ibm     from ASCII to alternate EBCDIC
block   pad \n-terminated records with spaces to cbs-size
unblock replace trailing spaces in cbs-size records with \n
lcase   change upper case to lower case
ucase   change lower case to upper case
swab    swap every pair of input bytes
sync    pad every input block with NULs to ibs-size;
        when used with block or unblock, pad with spaces

But we also have these, which should be flags IMHO:

noerror continue after read errors
notrunc do not truncate the output file
nocreat do not create the output file
excl    fail if the output file already exists
fdatasync physically write output  file  data  before  finishing
fsync   likewise, but also write metadata

Note only noerror and notrunc are specified by POSIX,
and POSIX dd has no flag options at all, so it's excused :)

I do agree that a flag=block is confusing with the existing
conv=block option, so I'm currently 60/40 for iflag=wait/conv=fill

cheers,
Pádraig.




reply via email to

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