projects
/
bluesky.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c2dd6d8
)
Update to a warning message to provide more debugging info
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 11 Mar 2011 19:34:04 +0000
(11:34 -0800)
committer
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 11 Mar 2011 19:34:04 +0000
(11:34 -0800)
bluesky/file.c
patch
|
blob
|
history
diff --git
a/bluesky/file.c
b/bluesky/file.c
index
e0c6255
..
72467f3
100644
(file)
--- 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;
&& 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);
bluesky_string_resize(b->dirty, BLUESKY_BLOCK_SIZE);
memset(&b->dirty->data[old_size], 0,
BLUESKY_BLOCK_SIZE - old_size);