DragonFly BSD
DragonFly bugs List (threaded) for 2009-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [issue1632] Seek to end of file returns 136 on CD/DVD drives


From: "Steve O'Hara-Smith" <steve@xxxxxxxxxx>
Date: Thu, 17 Dec 2009 14:13:56 +0000

On Thu, 17 Dec 2009 14:08:49 +0000
"Alex Hornung \(via DragonFly issue tracker\)"
<bugs@crater.dragonflybsd.org> wrote:

> 
> Alex Hornung <ahornung@gmail.com> added the comment:
> 
> I've identified the issue. In devfs getattr vnop I'm doing:
> vap->va_bytes = vap->va_size = sizeof(struct devfs_node);
> and kern_lseek then does:
> new_offset = offset + vattr.va_size;
> 
> I'm not quite sure how to solve this. Should the size be set to the
> physical size if the device is a disk type? This would also result in
> fstat to return the physical size for a disk.

	The one place I know it is used is in ddrescue  where it is
expected to return the amount of data that will be read by reading the
device until EOF, which for a DVD would be the amount of data written on
the media but for a hard disk would be the physical size of the disk.

-- 
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:>WIN                                      | A better way to focus the sun
The computer obeys and wins.                |    licences available see
You lose and Bill collects.                 |    http://www.sohara.org/



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]