This is the mail archive of the
mailing list for the Cygwin project.
Re: lseek() fails to seek on /dev/fd0 ('\\.\A:')
Tuesday, 27 February, 2001 Corinna Vinschen email@example.com wrote:
CV> On Tue, Feb 27, 2001 at 04:04:30PM +0300, Egor Duda wrote:
>> CV> Has somebody a 2.4 kernel to test the behaviour there?
>> i've just tested it under 2.4.0. it seeks correctly from the end of device
>> and returns device_size + offset.
>> if return value > 2G, it returns -1 with EOVERFLOW. I feel EFBIG is
>> more appropriate here, but it's arguable.
CV> Ok, that sounds more reasonable than the 2.2 behaviour. Would you
CV> mind to change your current patch to work on physical drives
CV> using IOCTL_DISK_GET_DRIVE_GEOMETRY and on partitions using the
CV> IOCTL_DISK_GET_PARTITION_INFO call and, hmm, I think you're right,
CV> to return EFBIG in the above case? That would be nice. I would
CV> like to see the patch first but I'm pretty sure I will approve it.
i've already modified it, the diff in my previous message is the
modified one. It determines drive geometry, and fails if it cannot,
and then tries to determine partition length. if the letter attempt is
successful, we assume it's partition, otherwise, that it uses drive
geometry. Alas, both ioctls fail on cdrom drive :(
Egor. mailto:firstname.lastname@example.org ICQ 5165414 FidoNet 2:5020/496.19