Major API change:

1. Introduced a cfs_offset_t type that designates file offsets. unsigned int
was insufficient on several platforms with non-volatile storage that exceed
the capacity of unsigned int.

2. Switched cfs_seek signature to POSIX style with a "whence" parameter.
This commit is contained in:
nvt-se 2009-02-27 14:25:37 +00:00
parent 5e038640e2
commit 3191a2568c
6 changed files with 78 additions and 44 deletions

View file

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cfs-eeprom.c,v 1.8 2008/11/24 10:56:55 nvt-se Exp $
* $Id: cfs-eeprom.c,v 1.9 2009/02/27 14:25:38 nvt-se Exp $
*/
#include "cfs/cfs.h"
@ -106,9 +106,9 @@ cfs_write(int f, const void *buf, unsigned int len)
}
/*---------------------------------------------------------------------------*/
unsigned int
cfs_seek(int f, unsigned int o)
cfs_seek(int f, unsigned int o, int w)
{
if(f == 1) {
if(w == CFS_SEEK_SET && f == 1) {
file.fileptr = o;
return o;
} else {