Made cfs implementation adhere to (new) cfs interface.

This commit is contained in:
oliverschmidt 2007-11-22 11:29:13 +00:00
parent c69a49b2a2
commit df1c80ee79
3 changed files with 17 additions and 22 deletions

View file

@ -30,9 +30,8 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cfs-eeprom.c,v 1.3 2007/11/17 18:01:00 adamdunkels Exp $
* $Id: cfs-eeprom.c,v 1.4 2007/11/22 11:29:13 oliverschmidt Exp $
*/
#include "contiki.h"
#include "cfs/cfs.h"
#include "dev/eeprom.h"
@ -95,7 +94,7 @@ cfs_write(int f, void *buf, unsigned int len)
}
}
/*---------------------------------------------------------------------------*/
int
unsigned int
cfs_seek(int f, unsigned int o)
{
if(f == 1) {
@ -109,18 +108,17 @@ cfs_seek(int f, unsigned int o)
int
cfs_opendir(struct cfs_dir *p, const char *n)
{
return 1;
return -1;
}
/*---------------------------------------------------------------------------*/
int
cfs_readdir(struct cfs_dir *p, struct cfs_dirent *e)
{
return 1;
return -1;
}
/*---------------------------------------------------------------------------*/
int
void
cfs_closedir(struct cfs_dir *p)
{
return 1;
}
/*---------------------------------------------------------------------------*/

View file

@ -30,12 +30,12 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cfs-ram.c,v 1.4 2007/11/17 18:01:00 adamdunkels Exp $
* $Id: cfs-ram.c,v 1.5 2007/11/22 11:29:13 oliverschmidt Exp $
*/
#include "contiki.h"
#include <string.h>
#include "cfs/cfs.h"
#include <string.h>
struct filestate {
int flag;
@ -120,7 +120,7 @@ cfs_write(int f, void *buf, unsigned int len)
}
}
/*---------------------------------------------------------------------------*/
int
unsigned int
cfs_seek(int f, unsigned int o)
{
if(f == 1) {
@ -137,18 +137,17 @@ cfs_seek(int f, unsigned int o)
int
cfs_opendir(struct cfs_dir *p, const char *n)
{
return 1;
return -1;
}
/*---------------------------------------------------------------------------*/
int
cfs_readdir(struct cfs_dir *p, struct cfs_dirent *e)
{
return 1;
return -1;
}
/*---------------------------------------------------------------------------*/
int
void
cfs_closedir(struct cfs_dir *p)
{
return 1;
}
/*---------------------------------------------------------------------------*/

View file

@ -30,9 +30,8 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: cfs-xmem.c,v 1.5 2007/11/17 18:01:00 adamdunkels Exp $
* $Id: cfs-xmem.c,v 1.6 2007/11/22 11:29:13 oliverschmidt Exp $
*/
#include "contiki.h"
#include "cfs/cfs.h"
#include "dev/xmem.h"
@ -127,7 +126,7 @@ cfs_write(int f, void *buf, unsigned int len)
}
}
/*---------------------------------------------------------------------------*/
int
unsigned int
cfs_seek(int f, unsigned int o)
{
if(f == 1) {
@ -144,18 +143,17 @@ cfs_seek(int f, unsigned int o)
int
cfs_opendir(struct cfs_dir *p, const char *n)
{
return 1;
return -1;
}
/*---------------------------------------------------------------------------*/
int
cfs_readdir(struct cfs_dir *p, struct cfs_dirent *e)
{
return 1;
return -1;
}
/*---------------------------------------------------------------------------*/
int
void
cfs_closedir(struct cfs_dir *p)
{
return 1;
}
/*---------------------------------------------------------------------------*/