]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fix end of log volume handling
authoridgay <idgay>
Fri, 20 Apr 2007 17:47:30 +0000 (17:47 +0000)
committeridgay <idgay>
Fri, 20 Apr 2007 17:47:30 +0000 (17:47 +0000)
tos/chips/at45db/LogStorageP.nc

index 4f384f275fb970e1346e58892a6926bb0e2a0793..4349e1eb870a5e1a900d394346be7cde2ba8f358 100644 (file)
@@ -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
       {