lseek on block devices?

Michael Krause (m.krause@tu-harburg.de)
Thu, 16 Jul 1998 20:14:25 +0200 (CEST)


Hi, a quick question:

Why don't we implement the lseek function in the fops of block
devices? If a seek to the end of a block device special file were
possible, programs could find out the length of a partition without
having to use ioctl(BLKGETSIZE) - they could simply fseek to the end
and use ftell(), which is the standard technique for ordinary files.

There would be a simple way to implement this, by providing a generic
function block_lseek (just like block_read), which would eventually
use the BLKGETSIZE ioctl transparently.

-- 
michael krause [aka raw style / lego] - http://ms.demo.org/rst/

- 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.altern.org/andrebalsa/doc/lkml-faq.html