From 6615e39e27a889b6fd98b48fcc8d12eb2b6f060b Mon Sep 17 00:00:00 2001 From: nvt-se Date: Fri, 27 Feb 2009 14:50:35 +0000 Subject: [PATCH] switched unsigned int to cfs_offset_t --- core/cfs/cfs-eeprom.c | 6 +++--- core/cfs/cfs-posix.c | 4 ++-- core/cfs/cfs.h | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/cfs/cfs-eeprom.c b/core/cfs/cfs-eeprom.c index 1591523ad..e5bc555e1 100644 --- a/core/cfs/cfs-eeprom.c +++ b/core/cfs/cfs-eeprom.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $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; diff --git a/core/cfs/cfs-posix.c b/core/cfs/cfs-posix.c index 2236f5c3f..712f1bfed 100644 --- a/core/cfs/cfs-posix.c +++ b/core/cfs/cfs-posix.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $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 @@ -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; diff --git a/core/cfs/cfs.h b/core/cfs/cfs.h index 5fce34a65..c01b6ce3b 100644 --- a/core/cfs/cfs.h +++ b/core/cfs/cfs.h @@ -54,28 +54,28 @@ * * Author: Adam Dunkels * - * $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. *