Re: problem with dd for floppy under 2.4.0

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Thu Jan 25 2001 - 13:27:21 EST


Mikael Pettersson wrote:
> There's a known bug in dd where it incorrectly attempts to truncate
> the output file even though it's a block device.

dd also attempts to truncate a character device, therefore fails in the
same way.

The kernel should probably return EINVAL for this rather than EPERM.

> In kernels older
> than 2.4.0-test10 or so it got away with this, but now the kernel
> correctly returns an error.
>
> Use the 'conv=notrunc' option to dd to fix this, i.e.
>
> dd if=rootfs.gz of=/dev/fd0 bs=1k conv=notrunc seek=XXX

If only it were so easy to fix the program that calls dd...

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jan 31 2001 - 21:00:22 EST