From: idgay Date: Fri, 20 Apr 2007 17:47:30 +0000 (+0000) Subject: fix end of log volume handling X-Git-Tag: tinyos/2.0.1~13 X-Git-Url: https://oss.titaniummirror.com/gitweb?a=commitdiff_plain;h=c169b622c8d9cd192c6ba8e53a92b0d6e35ff387;p=tinyos-2.x.git fix end of log volume handling --- 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 {