hal_files.h: Include a file offset in object data Topic is solved

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
Post Reply
faisal
Posts: 382
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 45 times
Been thanked: 62 times

hal_files.h: Include a file offset in object data

Post by faisal »

How about including a file offset in the object data - like:

Code: Select all

#define _file_stream_data                                                   \
  _base_sequential_stream_data                                          \
  fileoffset_t offset
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: hal_files.h: Include a file offset in object data

Post by Giovanni »

Hi,

There is the method fileStreamGetPosition() which I slightly modified, the offset could come from an underlying File System and there is no point in duplicating the information.

Also renamed fileStreamSeek() in fileStreamSetPosition().

Giovanni
Post Reply