switched unsigned int to cfs_offset_t

This commit is contained in:
nvt-se 2009-02-27 14:50:35 +00:00
parent e485c209b1
commit 6615e39e27
3 changed files with 13 additions and 13 deletions

View File

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cfs-eeprom.c,v 1.9 2009/02/27 14:25:38 nvt-se Exp $
* $Id: cfs-eeprom.c,v 1.10 2009/02/27 14:50:35 nvt-se Exp $
*/
#include "cfs/cfs.h"
@ -105,8 +105,8 @@ cfs_write(int f, const void *buf, unsigned int len)
}
}
/*---------------------------------------------------------------------------*/
unsigned int
cfs_seek(int f, unsigned int o, int w)
cfs_offset_t
cfs_seek(int f, cfs_offset_t o, int w)
{
if(w == CFS_SEEK_SET && f == 1) {
file.fileptr = o;

View File

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cfs-posix.c,v 1.13 2009/02/27 14:25:38 nvt-se Exp $
* $Id: cfs-posix.c,v 1.14 2009/02/27 14:50:35 nvt-se Exp $
*/
#include <stdio.h>
@ -85,7 +85,7 @@ cfs_write(int f, const void *b, unsigned int l)
}
/*---------------------------------------------------------------------------*/
cfs_offset_t
cfs_seek(int f, unsigned int o, int w)
cfs_seek(int f, cfs_offset_t o, int w)
{
if(w == CFS_SEEK_SET) {
w = SEEK_SET;

View File

@ -54,28 +54,28 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cfs.h,v 1.13 2009/02/27 14:25:38 nvt-se Exp $
* $Id: cfs.h,v 1.14 2009/02/27 14:50:35 nvt-se Exp $
*/
#ifndef __CFS_H__
#define __CFS_H__
#include "contiki.h"
#ifndef CFS_OFFSET_TYPE
typedef unsigned cfs_offset_t;
#else
typedef CFS_OFFSET_TYPE cfs_offset_t;
#endif
struct cfs_dir {
char dummy_space[32];
};
struct cfs_dirent {
char name[32];
unsigned int size;
cfs_offset_t size;
};
#ifndef CFS_OFFSET_TYPE
typedef unsigned cfs_offset_t;
#else
typedef CFS_OFFSET_TYPE cfs_offset_t;
#endif
/**
* Specify that cfs_open() should open a file for reading.
*