From: Michael Vrable Date: Fri, 11 Mar 2011 19:34:04 +0000 (-0800) Subject: Update to a warning message to provide more debugging info X-Git-Url: http://git.vrable.net/?a=commitdiff_plain;h=4dc5c6dcd6f6f4a9a76bbdb861063911fe618c90;hp=c2dd6d8db81e94e1448f2cd4ea405d7c4cbd25c9;p=bluesky.git Update to a warning message to provide more debugging info --- diff --git a/bluesky/file.c b/bluesky/file.c index e0c6255..72467f3 100644 --- a/bluesky/file.c +++ b/bluesky/file.c @@ -100,7 +100,11 @@ void bluesky_file_truncate(BlueSkyInode *inode, uint64_t size) && lastblock_old < BLUESKY_BLOCK_SIZE) { bluesky_block_touch(inode, inode->blocks->len - 1, TRUE); gsize old_size = b->dirty->len; - g_warn_if_fail(lastblock_old != old_size); + if (lastblock_old != old_size) { + fprintf(stderr, + "Warning: last block size = %zd, expected %d\n", + old_size, lastblock_old); + } bluesky_string_resize(b->dirty, BLUESKY_BLOCK_SIZE); memset(&b->dirty->data[old_size], 0, BLUESKY_BLOCK_SIZE - old_size);