lkml.org 
[lkml]   [1998]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlseek on block devices?

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

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.046 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site