+ /* Calculate number of bytes in the last block of the file */
+ int lastblock_old, lastblock_new;
+ lastblock_old = inode->size % BLUESKY_BLOCK_SIZE;
+ if (lastblock_old == 0 && inode->size > 0)
+ lastblock_old = BLUESKY_BLOCK_SIZE;
+ lastblock_new = size % BLUESKY_BLOCK_SIZE;
+ if (lastblock_new == 0 && size > 0)
+ lastblock_new = BLUESKY_BLOCK_SIZE;
+