aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/hal_files.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-06-02 16:23:30 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-06-02 16:23:30 +0000
commita3aec1cc01706f8a22410fe8aa4abc0958862c32 (patch)
treef535b8ed435d7e2530a2c9cb45ef0e931035bfd7 /os/hal/include/hal_files.h
parent40081c7239b14310cdaaf39fa1c24c43f91a178f (diff)
downloadChibiOS-a3aec1cc01706f8a22410fe8aa4abc0958862c32.tar.gz
ChibiOS-a3aec1cc01706f8a22410fe8aa4abc0958862c32.tar.bz2
ChibiOS-a3aec1cc01706f8a22410fe8aa4abc0958862c32.zip
Modified method to get file position.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12077 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/include/hal_files.h')
-rw-r--r--os/hal/include/hal_files.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/include/hal_files.h b/os/hal/include/hal_files.h
index ceb244959..e60dc3b26 100644
--- a/os/hal/include/hal_files.h
+++ b/os/hal/include/hal_files.h
@@ -72,7 +72,7 @@ typedef uint32_t fileoffset_t;
/* File get size method.*/ \
msg_t (*getsize)(void *instance); \
/* File get current position method.*/ \
- msg_t (*getposition)(void *instance); \
+ msg_t (*getposition)(void *instance, fileoffset_t *offset); \
/* File seek method.*/ \
msg_t (*lseek)(void *instance, fileoffset_t offset);
@@ -82,8 +82,7 @@ typedef uint32_t fileoffset_t;
* without implementation.
*/
#define _file_stream_data \
- _base_sequential_stream_data \
- fileoffset_t offset
+ _base_sequential_stream_data
/**
* @extends BaseSequentialStreamVMT
@@ -213,12 +212,13 @@ typedef struct {
* @brief Returns the current file pointer position.
*
* @param[in] ip pointer to a @p FileStream or derived class
+ * @param[out] offset current position in the file
* @return The current position inside the file.
* @retval FILE_ERROR operation failed.
*
* @api
*/
-#define fileStreamGetPosition(ip) ((ip)->vmt->getposition(ip))
+#define fileStreamGetPosition(ip, offset) ((ip)->vmt->getposition(ip, offset))
/**
* @brief Moves the file current pointer to an absolute position.