mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-02 19:29:30 +00:00
added file removal capability to xmem fs
This commit is contained in:
parent
33bf01534c
commit
8c608efea4
@ -30,7 +30,7 @@
|
|||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $Id: cfs-xmem.c,v 1.9 2008/11/24 10:56:55 nvt-se Exp $
|
* $Id: cfs-xmem.c,v 1.10 2008/11/30 22:42:40 nvt-se Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cfs/cfs.h"
|
#include "cfs/cfs.h"
|
||||||
@ -150,7 +150,11 @@ cfs_seek(int f, unsigned int o)
|
|||||||
int
|
int
|
||||||
cfs_remove(const char *name)
|
cfs_remove(const char *name)
|
||||||
{
|
{
|
||||||
return -1;
|
file.flag = FLAG_FILE_CLOSED;
|
||||||
|
file.fileptr = 0;
|
||||||
|
file.filesize = 0;
|
||||||
|
xmem_erase(CFS_XMEM_SIZE, CFS_XMEM_OFFSET);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user