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

Alex Hornung (via DragonFly issue tracker) sinknull at leaf.dragonflybsd.org
Thu Dec 17 06:10:42 PST 2009

Alex Hornung <ahornung at 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.

Unless anyone considers it to always set va_size and st_size to the disk size 
for a disk-type device in the next few hours or so, I'll do it this way.

Alex Hornung

assignedto:  -> alexh
nosy: +alexh
priority:  -> bug
status: unread -> in-progress

DragonFly issue tracker <bugs at lists.dragonflybsd.org>

More information about the Bugs mailing list