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: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Dec 2009 10:18:25 -0800 (PST)

:I've identified the issue. In devfs getattr vnop I'm doing:
:vap->va_bytes =3D vap->va_size =3D sizeof(struct devfs_node);
:and kern_lseek then does:
:new_offset =3D offset + vattr.va_size;
:
:I'm not quite sure how to solve this. Should the size be set to the physica=
:l=20
:size if the device is a disk type? This would also result in fstat to retur=
:n=20
:the physical size for a disk.
:
:Unless anyone considers it to always set va_size and st_size to the disk si=
:ze=20
:for a disk-type device in the next few hours or so, I'll do it this way.
:
:Cheers,
:Alex Hornung

    BSDs in the past have not supported st_size on disk devices, but
    linux has.  

    I personally think that if we can easily support st_size for disk devices
    that we should.

						-Matt




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