Skip to contentSkip to conversation

dd of=blkdev seek=123 -> EINVAL ??

DISCUSSION Matti Aarnio 1 participant 2 messages Dec 18, 2001

lore
Share & tools
lore
#0 lore raw

With recent dd and 2.4.17rc1 an attempt to write (with DD) into a block-device yields EINVAL error.

Doing strace shows that it comes from ftruncate64()
on the opened device.

Should there be some other error code ? EBLKDEV ?
Or is the dd (4.0p) at fault, and it should either not ask for the ftruncate*() at all, or ignore its error ?

/Matti Aarnio

#1 lore raw
Quoted 2 lines · Matti Aarnio

With recent dd (4.0p) and 2.4.17rc1 an attempt to write (with DD) into a block-device yields EINVAL error.

With dd 4.1.3 the problem no longer exists.
That newer version does fstat() on file, and notices that it is, indeed, a device.

End of problem.

But why I am seeing mysterious total hangs of this kernel is another story, and probably related to memory allocation...

/Matti Aarnio