From c169b622c8d9cd192c6ba8e53a92b0d6e35ff387 Mon Sep 17 00:00:00 2001 From: idgay Date: Fri, 20 Apr 2007 17:47:30 +0000 Subject: [PATCH] fix end of log volume handling --- tos/chips/at45db/LogStorageP.nc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tos/chips/at45db/LogStorageP.nc b/tos/chips/at45db/LogStorageP.nc index 4f384f27..4349e1eb 100644 --- a/tos/chips/at45db/LogStorageP.nc +++ b/tos/chips/at45db/LogStorageP.nc @@ -633,7 +633,7 @@ implementation would end on the last byte of the last page, as this would mean that we would not sync the last page, breaking the log volume invariant */ - if (s[client].wpos % vlen >= vlen - len) + if ((s[client].wpos - PAGE_SIZE) % vlen >= vlen - len) sync(); else { -- 2.39.2