<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/dd.c, branch v8.18</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.18</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2012-06-22T11:16:04Z</updated>
<entry>
<title>doc: document multiplier for dd number options like count=N</title>
<updated>2012-06-22T11:16:04Z</updated>
<author>
<name>Bernhard Voelker</name>
<email>mail@bernhard-voelker.de</email>
</author>
<published>2012-06-21T11:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4f2e9d503821c3eadc7344a7e85400779822bf0d'/>
<id>urn:sha1:4f2e9d503821c3eadc7344a7e85400779822bf0d</id>
<content type='text'>
* src/dd.c (usage): Add "N" to the description of multipliers.
* doc/coreutils.texi (dd invocation): Likewise.
</content>
</entry>
<entry>
<title>maint: refactor common mode bits used to create files</title>
<updated>2012-06-22T10:17:38Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-06-22T10:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=30a604e631291b80b9812e03e0f325489ae0d77e'/>
<id>urn:sha1:30a604e631291b80b9812e03e0f325489ae0d77e</id>
<content type='text'>
* src/system.h (MODE_RW_UGO): The new refactored define (666).
* src/mkfifo.c: Use the new define.
* src/mknod.c: Likewise.
* src/split.c: Likewise.
* src/system.h: Likewise.
* src/touch.c: Likewise.
* src/truncate.c: Likewise.

Suggested-by: Jim Meyering
</content>
</entry>
<entry>
<title>maint: handle file sizes more reliably</title>
<updated>2012-05-10T09:02:42Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2012-05-10T06:53:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9d308df13271a852aee7d46c65432fa84145ea31'/>
<id>urn:sha1:9d308df13271a852aee7d46c65432fa84145ea31</id>
<content type='text'>
Problem reported by Samuel Thibault in &lt;http://bugs.gnu.org/11424&gt;.
* NEWS: Document this.
* src/dd.c (skip): Handle skipping past EOF on shared or typed
memory objects the same way as with regular files.
(dd_copy): It's OK to truncate shared memory objects.
* src/du.c (duinfo_add): Check for overflow.
(print_only_size): Report overflow.
(process_file): Ignore negative file sizes in the --apparent-size case.
* src/od.c (skip): Fix comment about st_size.
* src/split.c (main):
* src/truncate.c (do_ftruncate, main):
On files where st_size is not portable, fall back on using lseek
with SEEK_END to determine the size.  Although strictly speaking
POSIX says the behavior is implementation-defined, in practice
if lseek returns a nonnegative value it's a reasonable one to
use for the file size.
* src/system.h (usable_st_size): Symlinks have reliable st_size too.
* tests/misc/truncate-dir-fail: Don't assume that getting the size
of a dir is not allowed, as it's now allowed on many platforms,
e.g., GNU/Linux.
</content>
</entry>
<entry>
<title>maint: refactor copy to use is_nul()</title>
<updated>2012-03-06T23:43:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-03-01T11:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4b4a465798a212925670cc4fef7610678d221d69'/>
<id>urn:sha1:4b4a465798a212925670cc4fef7610678d221d69</id>
<content type='text'>
* src/dd.c: Move is_nul() from here to ...
* src/system.h: ... here
* src/copy.c (sparse_copy): Adjust to use the refactored is_nul()
</content>
</entry>
<entry>
<title>dd: add support for the conv=sparse option</title>
<updated>2012-02-29T00:17:56Z</updated>
<author>
<name>Roman Rybalko</name>
<email>devel@romanr.info</email>
</author>
<published>2012-02-27T13:53:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4e776faa8482ae630d2ea9bc767298e664f07ba9'/>
<id>urn:sha1:4e776faa8482ae630d2ea9bc767298e664f07ba9</id>
<content type='text'>
Notes:
  Small seeks are not coalesced to larger ones,
  like is done in cache_round() for example.

  conv= is used rather then oflag= for FreeBSD compatibility.

* src/dd.c (final_op_was_seek): A new global boolean to flag
whether the final "write" was converted to a seek.
(usage): Describe the new conf=sparse option.
(iwrite): Convert a write of a NUL block to a seek if requested.
(do_copy): Initialize the output buffer to have a sentinel,
to allow for efficient testing for NUL output blocks.
If the last block in the file was converted to a seek,
then convert back to a write so the size is updated.
* NEWS: Mention the new feature.
* tests/dd/sparse: A new test for the feature.
* tests/Makefile.am: Reference the new test.
</content>
</entry>
<entry>
<title>dd: fix issues in the count_bytes and seek_bytes flags change</title>
<updated>2012-02-13T21:58:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-02-13T21:47:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4bb5dbcfef55c4f66755dd3c48b906e4e9030b96'/>
<id>urn:sha1:4bb5dbcfef55c4f66755dd3c48b906e4e9030b96</id>
<content type='text'>
These edge cases were missed in the previous commit 140eca15c.

* src/dd.c (main): Include the bytes slop when truncating
without further I/O.  Don't invalidate the whole file cache
in the case where 0 &lt; count &lt; ibs.
* tests/dd/bytes: Change to using the independent truncate
command to generate the file for comparison.  Remove a redundant
test case and replace with one testing the truncation only logic.
</content>
</entry>
<entry>
<title>dd: add count_bytes, skip_bytes and seek_bytes flags</title>
<updated>2012-02-12T17:34:28Z</updated>
<author>
<name>Jérémy Compostella</name>
<email>jeremy.compostella@gmail.com</email>
</author>
<published>2012-02-04T14:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=140eca15c4a3d3213629a048cc307fde0d094738'/>
<id>urn:sha1:140eca15c4a3d3213629a048cc307fde0d094738</id>
<content type='text'>
dd now accepts the count_bytes and skip_bytes input flag and the
seek_bytes output flag, to more easily allow processing portions of a
file.

* src/dd.c (scanargs): Compute skip_records and skip_bytes when
'skip_bytes' iflag is used. Compute max_records and max_bytes when
'count_bytes' iflag is used. Compute seek_records and seek_bytes
when 'seek_bytes' oflag is used.
(skip_via_lseek): Use new 'bytes' parameter and handle potential
'records' equals to zero. Update the bytes parameter when called with
'fdesc' equal to STDOUT_FILENO. Update the header comments.
(dd_copy): Skip accordingly to skip_records AND skip_bytes. Count
accordingly to max_records AND max_bytes. Seek on output accordingly
to seek_records AND seek_bytes.
* NEWS (New features): Mention it.
* doc/coreutils.texi (dd invocation): Detail new flags and behaviors.
* tests/dd/bytes: New file. Tests for these new flags.
* tests/Makefile.am (TESTS): Add it.
</content>
</entry>
<entry>
<title>maint: add braces as requested by HACKING coding standard</title>
<updated>2012-02-06T01:34:20Z</updated>
<author>
<name>Jérémy Compostella</name>
<email>jeremy.compostella@gmail.com</email>
</author>
<published>2012-02-05T16:53:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=31eeead93842c6581e0a9b21f6e8eb964d0c9309'/>
<id>urn:sha1:31eeead93842c6581e0a9b21f6e8eb964d0c9309</id>
<content type='text'>
* src/dd.c (dd_copy): Braces were missing for this do/while statement.
</content>
</entry>
<entry>
<title>maint: use single copyright year range</title>
<updated>2012-01-27T10:35:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-27T10:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d7878454cd02518959b0d6036db3a5b6ff00ca57'/>
<id>urn:sha1:d7878454cd02518959b0d6036db3a5b6ff00ca57</id>
<content type='text'>
Run "make update-copyright".
</content>
</entry>
<entry>
<title>maint: src/*.c: change remaining quotes (without embedded spaces)</title>
<updated>2012-01-09T20:50:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-08T14:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a517386f1bf8c64ee7617cc2c9d0a16a1d85c8c4'/>
<id>urn:sha1:a517386f1bf8c64ee7617cc2c9d0a16a1d85c8c4</id>
<content type='text'>
Run this (twice):
  git grep -E -l '`[^ ]+'\' src/*.c \
    |xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
</content>
</entry>
</feed>
