From abfb7ab5e9a2190644be34463d37734fa1e9c5d5 Mon Sep 17 00:00:00 2001 From: idgay Date: Fri, 20 Apr 2007 17:39:37 +0000 Subject: [PATCH] handle full log --- apps/tests/storage/Log/RandRWC.nc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/tests/storage/Log/RandRWC.nc b/apps/tests/storage/Log/RandRWC.nc index ab762de7..7e5ae49a 100644 --- a/apps/tests/storage/Log/RandRWC.nc +++ b/apps/tests/storage/Log/RandRWC.nc @@ -99,6 +99,8 @@ implementation { return b; } + volatile int x; + void setParameters() { len = rand() >> 8; offset = rand() >> 9; @@ -138,7 +140,9 @@ implementation { } event void LogWrite.appendDone(void *buf, storage_len_t y, bool recordsLost, error_t result) { - if (scheck(result)) + if (result == ESIZE) + scheck(call LogWrite.sync()); + else if (scheck(result)) nextWrite(); } -- 2.39.2