panic: declare as printf-style-checked
. and related fixes Change-Id: I5131ac57dc53d8aec8d421a34c5ceea383404d7a
This commit is contained in:
@@ -316,7 +316,7 @@ void free_block(struct super_block *sp, bit_t bit_returned)
|
||||
bp = get_block(sp->s_dev, gd->block_bitmap, NORMAL);
|
||||
|
||||
if (unsetbit(b_bitmap(bp), bit))
|
||||
panic("Tried to free unused block", bit_returned);
|
||||
panic("Tried to free unused block %d", bit_returned);
|
||||
|
||||
lmfs_markdirty(bp);
|
||||
put_block(bp, MAP_BLOCK);
|
||||
|
||||
@@ -229,7 +229,7 @@ static void free_inode_bit(struct super_block *sp, bit_t bit_returned,
|
||||
bp = get_block(sp->s_dev, gd->inode_bitmap, NORMAL);
|
||||
|
||||
if (unsetbit(b_bitmap(bp), bit))
|
||||
panic("Tried to free unused inode", bit_returned);
|
||||
panic("Tried to free unused inode %d", bit_returned);
|
||||
|
||||
lmfs_markdirty(bp);
|
||||
put_block(bp, MAP_BLOCK);
|
||||
|
||||
@@ -234,7 +234,7 @@ void put_inode(
|
||||
return; /* checking here is easier than in caller */
|
||||
|
||||
if (rip->i_count < 1)
|
||||
panic("put_inode: i_count already below 1", rip->i_count);
|
||||
panic("put_inode: i_count already below 1: %d", rip->i_count);
|
||||
|
||||
if (--rip->i_count == 0) { /* i_count == 0 means no one is using it now */
|
||||
if (rip->i_links_count == NO_LINK) {
|
||||
|
||||
+1
-1
@@ -718,7 +718,7 @@ off_t len;
|
||||
panic("zeroblock_range: no block");
|
||||
offset = pos % rip->i_sp->s_block_size;
|
||||
if (offset + len > rip->i_sp->s_block_size)
|
||||
panic("zeroblock_range: len too long", len);
|
||||
panic("zeroblock_range: len too long: %d", len);
|
||||
memset(b_data(bp) + offset, 0, len);
|
||||
lmfs_markdirty(bp);
|
||||
put_block(bp, FULL_DATA_BLOCK);
|
||||
|
||||
+1
-1
@@ -171,7 +171,7 @@ int fs_mkdir()
|
||||
/* It was not possible to enter . or .. probably disk was full -
|
||||
* links counts haven't been touched. */
|
||||
if (search_dir(ldirp, lastc, NULL, DELETE, IGN_PERM, 0) != OK)
|
||||
panic("Dir disappeared ", rip->i_num);
|
||||
panic("Dir disappeared: %d ", rip->i_num);
|
||||
rip->i_links_count--; /* undo the increment done in new_node() */
|
||||
}
|
||||
rip->i_dirt = IN_DIRTY; /* either way, i_links_count has changed */
|
||||
|
||||
@@ -42,7 +42,7 @@ struct super_block *get_super(
|
||||
if (dev == NO_DEV)
|
||||
panic("request for super_block of NO_DEV");
|
||||
if (superblock->s_dev != dev)
|
||||
panic("wrong superblock", (int) dev);
|
||||
panic("wrong superblock: 0x%x", (int) dev);
|
||||
|
||||
return(superblock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user