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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -441,7 +441,7 @@ int lookup_hook(struct inode *parent, char *name,
|
||||
* Alternative: pull in only PM's table?
|
||||
*/
|
||||
if ((r = getticks(&now)) != OK)
|
||||
panic(__FILE__, "unable to get uptime", r);
|
||||
panic("unable to get uptime: %d", r);
|
||||
|
||||
if (last_update != now) {
|
||||
update_tables();
|
||||
|
||||
@@ -673,7 +673,7 @@ struct filp *f;
|
||||
f->filp_mode = FILP_CLOSED;
|
||||
f->filp_count = 0;
|
||||
} else if (f->filp_count < 0) {
|
||||
panic("VFS: invalid filp count: %d ino %d/%d", f->filp_count,
|
||||
panic("VFS: invalid filp count: %d ino %d/%u", f->filp_count,
|
||||
vp->v_dev, vp->v_inode_nr);
|
||||
} else {
|
||||
unlock_vnode(f->filp_vno);
|
||||
|
||||
@@ -1147,9 +1147,9 @@ void pt_init(void)
|
||||
kern_mappings[index].flags |= ARCH_VM_PTE_RO;
|
||||
#endif
|
||||
if(addr % VM_PAGE_SIZE)
|
||||
panic("VM: addr unaligned: %d", addr);
|
||||
panic("VM: addr unaligned: %lu", addr);
|
||||
if(len % VM_PAGE_SIZE)
|
||||
panic("VM: len unaligned: %d", len);
|
||||
panic("VM: len unaligned: %lu", len);
|
||||
vir = offset;
|
||||
if(sys_vmctl_reply_mapping(index, vir) != OK)
|
||||
panic("VM: reply failed");
|
||||
|
||||
Reference in New Issue
Block a user