diff --git a/platform/cooja/cfs/cfs-cooja.c b/platform/cooja/cfs/cfs-cooja.c index 3819277b6..13bf84c9f 100644 --- a/platform/cooja/cfs/cfs-cooja.c +++ b/platform/cooja/cfs/cfs-cooja.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: cfs-cooja.c,v 1.11 2010/02/05 08:59:51 fros4943 Exp $ + * $Id: cfs-cooja.c,v 1.12 2010/11/15 21:44:37 adamdunkels Exp $ */ #include #include "lib/simEnvChange.h" @@ -49,7 +49,7 @@ static struct filestate file; const struct simInterface cfs_interface; // COOJA variables -#define CFS_BUF_SIZE 1000 /* Configure CFS size here and in ContikiCFS.java */ +#define CFS_BUF_SIZE 4000 /* Configure CFS size here and in ContikiCFS.java */ char simCFSData[CFS_BUF_SIZE] = { 0 }; char simCFSChanged = 0; int simCFSRead = 0; @@ -102,6 +102,7 @@ cfs_write(int f, const void *buf, unsigned int len) if(file.flag == FLAG_FILE_OPEN && file.access & CFS_WRITE) { if(file.fileptr + len > CFS_BUF_SIZE) { len = CFS_BUF_SIZE - file.fileptr; + printf("cfs-cooja.c: warning: write truncated\n"); } memcpy(&simCFSData[file.fileptr], buf, len); file.fileptr += len; diff --git a/tools/cooja/java/se/sics/cooja/contikimote/interfaces/ContikiCFS.java b/tools/cooja/java/se/sics/cooja/contikimote/interfaces/ContikiCFS.java index 17522c307..0ea5aa1d9 100644 --- a/tools/cooja/java/se/sics/cooja/contikimote/interfaces/ContikiCFS.java +++ b/tools/cooja/java/se/sics/cooja/contikimote/interfaces/ContikiCFS.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ContikiCFS.java,v 1.11 2010/02/05 09:01:06 fros4943 Exp $ + * $Id: ContikiCFS.java,v 1.12 2010/11/15 21:44:38 adamdunkels Exp $ */ package se.sics.cooja.contikimote.interfaces; @@ -70,7 +70,7 @@ import se.sics.cooja.interfaces.PolledAfterActiveTicks; public class ContikiCFS extends MoteInterface implements ContikiMoteInterface, PolledAfterActiveTicks { private static Logger logger = Logger.getLogger(ContikiCFS.class); - public int FILESYSTEM_SIZE = 1000; /* Configure CFS size here and in cfs-cooja.c */ + public int FILESYSTEM_SIZE = 4000; /* Configure CFS size here and in cfs-cooja.c */ private Mote mote = null; private SectionMoteMemory moteMem = null;