imel
On Tue, 7 Dec 1999, Thomas Waldmann wrote:
> If you do a llseek(fh, 0, SEEK_END) on normal file, you get the new position
> (== end of file == size of file) as return value. So this is an easy method
> for getting the size of a file.
>
> If you try that with /dev/hda (e.g. 15GB), it doesn't behave like that, you
> just get 0 as return value, because in
>
> loff_t default_llseek(struct file *file, loff_t offset, int origin)
> {
> long long retval;
>
> switch (origin) {
> case 2:
> offset += file->f_dentry->d_inode->i_size;
> break;
> ...
>
> the value of file->f_dentry->d_inode->i_size is zero !?
-
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/