[comp.os.minix] BUG in DD.C

HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) (05/07/90)

When using dd, the last write call (for writing the partial buffer)
writes out only the actual data, which might be less than the output
block size. When writing to devices which support only discrete sizes
(tapes, disks) - the write call fails and dd emits ,,write error''.

When copying to disks with 1K-sectors, it happens frequently that the
last write call wants to write, say, only 512 Bytes.

The fix is straightforward and easy, look for write calls. Always write
in chunks of obs (output_block_size), not obc (output_buffer_count).

Christoph van Wuellen.