[PATCH 1/3] Filesystem: PR1398: Fix lseek() mechanic

Sebastian Huber sebastian.huber at embedded-brains.de
Tue May 8 05:34:45 UTC 2012


On 08/05/12 00:52, Chris Johns wrote:
> On 8/05/12 1:09 AM, sebastian.huber at embedded-brains.de wrote:
>> From: Sebastian Huber<sebastian.huber at embedded-brains.de>
>>
>> According to POSIX the lseek() function shall not, by itself, extend the
>> size of a file.
>>
>> Remove the size field of rtems_libio_t.  A file has only on size but may
>> have multiple open file descriptors.  Thus a file size field in the file
>> descriptor may lead to inconsistencies.
>>
>> New default handlers rtems_filesystem_default_lseek_file() and
>> rtems_filesystem_default_lseek_directory().
>
> Looks good. It is nice to have this sorted. Thanks.
>
> Minor formatting issue below.

Thanks for the review.

Is the complex rtems_rfs_rtems_file_lseek() really necessary?  What 
happens if we simply change the iop->offset?  Will the read and write 
handler cope with that?

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list