Changed Contiki File System (cfs) from a service to a plain library.
This change means that one needs to select _ONE_ cfs implementation at Contiki library link time. But this doesn't appear to be an issue as all platforms have their "favorite" implementation anyway.
This commit is contained in:
parent
67ae9fbcb7
commit
9f97290665
14 changed files with 94 additions and 545 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: test-cfs.c,v 1.1 2007/03/23 12:17:28 adamdunkels Exp $
|
||||
* $Id: test-cfs.c,v 1.2 2007/05/19 21:07:07 oliverschmidt Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -40,15 +40,12 @@
|
|||
|
||||
#include "contiki.h"
|
||||
#include "cfs/cfs.h"
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS(cfs_process, "xmem cfs");
|
||||
AUTOSTART_PROCESSES(&cfs_process);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS_THREAD(cfs_process, ev, data)
|
||||
{
|
||||
PROCESS_BEGIN();
|
||||
|
||||
|
||||
{
|
||||
int i, j, fd;
|
||||
int errors = 0;
|
||||
|
@ -84,7 +81,7 @@ PROCESS_THREAD(cfs_process, ev, data)
|
|||
}
|
||||
printf("CFS xmem test 1 completed with %d errors\n", errors);
|
||||
|
||||
fd = cfs_open("hej", CFS_WRITE);
|
||||
fd = cfs_open("hej", CFS_WRITE);
|
||||
if(fd < 0) {
|
||||
printf("could not open file for writing, aborting\n");
|
||||
} else {
|
||||
|
@ -112,7 +109,7 @@ PROCESS_THREAD(cfs_process, ev, data)
|
|||
}
|
||||
}
|
||||
printf("CFS xmem test 2 completed with %d errors\n", errors);
|
||||
}
|
||||
}
|
||||
|
||||
PROCESS_END();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue