dd: work around buffer length restrictions with oflag=direct (O_DIRECT)
authorJim Meyering <meyering@redhat.com>
Tue, 4 Aug 2009 17:54:58 +0000 (19:54 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 6 Aug 2009 07:41:50 +0000 (09:41 +0200)
commit5929322ccb1f9d27c1b07b746d37419d17a7cbf6
tree685ca3efe05ce619b33392ea499ad87c1c7a620c
parent365fb90eaae52c92d6af8e87769e72b872492f4a
dd: work around buffer length restrictions with oflag=direct (O_DIRECT)

dd oflag=direct would fail to copy a file with size that is
not a multiple of 512 (destination file system specific)

* NEWS (Bug fixes): Mention it.
* src/dd.c (iwrite): Turn off O_DIRECT for any
smaller-than-obs-sized write.  Don't bother to restore it.
* tests/dd/direct: New test for the above.
* tests/Makefile.am (TESTS): Add dd/direct.
* doc/coreutils.texi (dd invocation): Mention oflag=direct
buffer size restriction.
Details in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/17586
Reported by Eric Sandeen.
NEWS
doc/coreutils.texi
src/dd.c
tests/Makefile.am
tests/dd/direct [new file with mode: 0755]