reading a raw device starting from end

From: Amit S. Kale (akale@veritas.com)
Date: Fri Apr 21 2000 - 06:00:28 EST


Hi,

Reading a raw device starting from end returns 0.
If you do a 'dd' to a raw device without specifying count of blocks, it writes
to the end. After this write returns 0 which causes dd to retry the write ( Not
sure why dd retries write ) Thus dd falls into an infinite loop.

This does not happen on a block device as writing starting from end returns
ENOSPC

Should this be considered as a bug in dd or incorrect behavior of raw device
driver?

I think correct behavior of raw device would be to return number of bytes
written if write started before end of device and extended beyond end.
If write started at or beyond end of device, return ENOSPC.

Thanks.

-- 
Amit Kale
Veritas Software ( http://www.veritas.com )

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



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:18 EST