Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#46 lseek() changes the size in stead of only the offset

closed-remind
Olaf Barthel
None
5
2008-04-30
2007-10-27
No

lseek() in clib2 changes the size in stead of only the size of the offset.

The example should make a number of 0byte files with an offset of 2147483647bytes. In stead it makes files with a size of 2147483647bytes.

Discussion

  • example to show the bug

     
    Attachments
  • Olaf Barthel
    Olaf Barthel
    2008-03-10

    • assigned_to: nobody --> obarthel
     
  • Olaf Barthel
    Olaf Barthel
    2008-03-10

    • status: open --> open-remind
     
  • Olaf Barthel
    Olaf Barthel
    2008-03-10

    Logged In: YES
    user_id=1089675
    Originator: NO

    This is a feature required for Samba to work, and it is present only in the -lunix flavour of clib2. It's intended to simulate "sparse files". On Unix you can seek to any position beyond the end of the file, and as soon as you make the first write access at this position, the file will grow to the intended size. You cannot simulate this properly on the Amiga without increasing the complexity of the code that tends to the seek position when data is written.

     
  • Olaf Barthel
    Olaf Barthel
    2008-04-30

    • status: open-remind --> closed-remind