summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/dir.c9
-rw-r--r--ext2fs/getblk.c2
-rw-r--r--ext2fs/hyper.c25
-rw-r--r--ext2fs/ialloc.c26
4 files changed, 24 insertions, 38 deletions
diff --git a/ext2fs/dir.c b/ext2fs/dir.c
index 641a146f..c4118b9d 100644
--- a/ext2fs/dir.c
+++ b/ext2fs/dir.c
@@ -341,8 +341,7 @@ dirscanblock (vm_address_t blockaddr, struct node *dp, int idx, char *name,
|| EXT2_DIR_REC_LEN (entry->name_len) > entry->rec_len
|| memchr (entry->name, '\0', entry->name_len))
{
- ext2_warning ("dirscanblock",
- "Bad directory entry: inode: %d offset: %ld",
+ ext2_warning ("bad directory entry: inode: %d offset: %ld",
dp->dn->number,
currentoff - blockaddr + idx * DIRBLKSIZ);
return ENOENT;
@@ -878,8 +877,7 @@ diskfs_get_directs (struct node *dp,
if (entryp->rec_len == 0)
{
- ext2_warning ("diskfs_get_directs",
- "Zero length directory entry: inode: %d offset: %ld",
+ ext2_warning ("zero length directory entry: inode: %d offset: %ld",
dp->dn->number,
blkno * DIRBLKSIZ + bufp - buf);
return EIO;
@@ -893,8 +891,7 @@ diskfs_get_directs (struct node *dp,
}
else if (bufp - buf > DIRBLKSIZ)
{
- ext2_warning ("diskfs_get_directs",
- "Directory entry too long: inode: %d offset: %ld",
+ ext2_warning ("directory entry too long: inode: %d offset: %ld",
dp->dn->number,
blkno * DIRBLKSIZ + bufp - buf - entryp->rec_len);
return EIO;
diff --git a/ext2fs/getblk.c b/ext2fs/getblk.c
index d3fd4df8..731a7deb 100644
--- a/ext2fs/getblk.c
+++ b/ext2fs/getblk.c
@@ -236,7 +236,7 @@ ext2_getblk (struct node *node, block_t block, int create, block_t *disk_block)
addr_per_block * addr_per_block +
addr_per_block * addr_per_block * addr_per_block)
{
- ext2_warning ("ext2_getblk", "block > big");
+ ext2_warning ("block > big: %lu", block);
return EIO;
}
/*
diff --git a/ext2fs/hyper.c b/ext2fs/hyper.c
index 390203f3..c62dd21e 100644
--- a/ext2fs/hyper.c
+++ b/ext2fs/hyper.c
@@ -37,39 +37,34 @@ get_hypermetadata (void)
&& sblock->s_magic != EXT2_PRE_02B_MAGIC
#endif
)
- ext2_panic("get_hypermetadata",
- "Bad magic number %#x (should be %#x)",
- sblock->s_magic, EXT2_SUPER_MAGIC);
+ ext2_panic ("bad magic number %#x (should be %#x)",
+ sblock->s_magic, EXT2_SUPER_MAGIC);
block_size = EXT2_MIN_BLOCK_SIZE << sblock->s_log_block_size;
if (block_size > 8192)
- ext2_panic("get_hypermetadata",
- "Block size %ld is too big (max is 8192 bytes)", block_size);
+ ext2_panic ("block size %ld is too big (max is 8192 bytes)", block_size);
log2_dev_blocks_per_fs_block = 0;
while ((device_block_size << log2_dev_blocks_per_fs_block) < block_size)
log2_dev_blocks_per_fs_block++;
if ((device_block_size << log2_dev_blocks_per_fs_block) != block_size)
- ext2_panic("get_hypermetadata",
- "Block size %ld isn't a power-of-two multiple of the device"
- " block size (%d)!",
- block_size, device_block_size);
+ ext2_panic ("block size %ld isn't a power-of-two multiple of the device"
+ " block size (%d)!",
+ block_size, device_block_size);
log2_stat_blocks_per_fs_block = 0;
while ((512 << log2_stat_blocks_per_fs_block) < block_size)
log2_stat_blocks_per_fs_block++;
if ((512 << log2_stat_blocks_per_fs_block) != block_size)
- ext2_panic("get_hypermetadata",
- "Block size %ld isn't a power-of-two multiple of 512!",
- block_size);
+ ext2_panic ("block size %ld isn't a power-of-two multiple of 512!",
+ block_size);
log2_block_size = 0;
while ((1 << log2_block_size) < block_size)
log2_block_size++;
if ((1 << log2_block_size) != block_size)
- ext2_panic("get_hypermetadata",
- "Block size %ld isn't a power of two!", block_size);
+ ext2_panic ("block size %ld isn't a power of two!", block_size);
if (!diskfs_readonly && block_size < vm_page_size)
/* If the block size is too small, we have to take extra care when
@@ -94,7 +89,7 @@ get_hypermetadata (void)
if (frag_size)
frags_per_block = block_size / frag_size;
else
- ext2_panic("get_hypermetadata", "Frag size is zero!");
+ ext2_panic ("frag size is zero!");
groups_count =
((sblock->s_blocks_count - sblock->s_first_data_block +
diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c
index cc902a46..2af27c6b 100644
--- a/ext2fs/ialloc.c
+++ b/ext2fs/ialloc.c
@@ -65,7 +65,7 @@ diskfs_free_node (struct node *np, mode_t old_mode)
if (inum < EXT2_FIRST_INO || inum > sblock->s_inodes_count)
{
- ext2_error ("free_inode", "reserved inode or nonexistent inode");
+ ext2_error ("reserved inode or nonexistent inode: %lu", inum);
spin_unlock (&global_lock);
return;
}
@@ -77,7 +77,7 @@ diskfs_free_node (struct node *np, mode_t old_mode)
bh = bptr (gdp->bg_inode_bitmap);
if (!clear_bit (bit, bh))
- ext2_warning ("ext2_free_inode", "bit already cleared for inode %u", inum);
+ ext2_warning ("bit already cleared for inode %u", inum);
else
{
record_global_poke (bh);
@@ -219,8 +219,7 @@ repeat:
{
if (set_bit (inum, bh))
{
- ext2_warning ("ext2_new_inode",
- "bit already set for inode %d", inum);
+ ext2_warning ("bit already set for inode %d", inum);
goto repeat;
}
record_global_poke (bh);
@@ -229,8 +228,7 @@ repeat:
{
if (gdp->bg_free_inodes_count != 0)
{
- ext2_error ("ext2_new_inode",
- "Free inodes count corrupted in group %d", i);
+ ext2_error ("free inodes count corrupted in group %d", i);
inum = 0;
goto sync_out;
}
@@ -240,8 +238,7 @@ repeat:
inum += i * sblock->s_inodes_per_group + 1;
if (inum < EXT2_FIRST_INO || inum > sblock->s_inodes_count)
{
- ext2_error ("ext2_new_inode",
- "reserved inode or inode > inodes count - "
+ ext2_error ("reserved inode or inode > inodes count - "
"block_group = %d,inode=%d", i, inum);
inum = 0;
goto sync_out;
@@ -290,8 +287,7 @@ diskfs_alloc_node (struct node *dir, mode_t mode, struct node **node)
if (np->dn_stat.st_blocks)
{
- ext2_warning("diskfs_alloc_node",
- "Free inode %d had %d blocks", inum, np->dn_stat.st_blocks);
+ ext2_warning("Free inode %d had %d blocks", inum, np->dn_stat.st_blocks);
np->dn_stat.st_blocks = 0;
np->dn_set_ctime = 1;
}
@@ -377,15 +373,13 @@ ext2_check_inodes_bitmap ()
x = count_free (bptr (gdp->bg_inode_bitmap),
sblock->s_inodes_per_group / 8);
if (gdp->bg_free_inodes_count != x)
- ext2_error ("ext2_check_inodes_bitmap",
- "Wrong free inodes count in group %d, "
- "stored = %d, counted = %lu", i,
- gdp->bg_free_inodes_count, x);
+ ext2_error ("wrong free inodes count in group %d, "
+ "stored = %d, counted = %lu",
+ i, gdp->bg_free_inodes_count, x);
bitmap_count += x;
}
if (sblock->s_free_inodes_count != bitmap_count)
- ext2_error ("ext2_check_inodes_bitmap",
- "Wrong free inodes count in super block, "
+ ext2_error ("wrong free inodes count in super block, "
"stored = %lu, counted = %lu",
(unsigned long) sblock->s_free_inodes_count, bitmap_count);