summaryrefslogtreecommitdiff
path: root/ext4_journal.c
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2019-10-30 15:09:20 +0800
committerIru Cai <mytbk920423@gmail.com>2019-10-30 15:09:20 +0800
commiteef8e7b05ffab4c7d12a5f7e135357c0462c180c (patch)
treec9f0168afa6bc3588d55fddcbf50a59c8074ce8c /ext4_journal.c
parentae51f41d14f548d494ac41e0d21137c5a4c3f59c (diff)
downloaduext4-eef8e7b05ffab4c7d12a5f7e135357c0462c180c.tar.xz
printf -> dbg_printf
Diffstat (limited to 'ext4_journal.c')
-rw-r--r--ext4_journal.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext4_journal.c b/ext4_journal.c
index 3559daf..4a255d4 100644
--- a/ext4_journal.c
+++ b/ext4_journal.c
@@ -157,7 +157,7 @@ int ext4fs_log_journal(char *journal_buffer, uint32_t blknr)
short i;
if (!journal_buffer) {
- printf("Invalid input arguments %s\n", __func__);
+ dbg_printf("Invalid input arguments %s\n", __func__);
return -EINVAL;
}
@@ -187,7 +187,7 @@ int ext4fs_put_metadata(char *metadata_buffer, uint32_t blknr)
{
struct ext_filesystem *fs = get_fs();
if (!metadata_buffer) {
- printf("Invalid input arguments %s\n", __func__);
+ dbg_printf("Invalid input arguments %s\n", __func__);
return -EINVAL;
}
if (dirty_block_ptr[gd_index]->buf)
@@ -216,11 +216,11 @@ void print_revoke_blks(char *revk_blk)
header = (struct journal_revoke_header_t *) revk_blk;
offset = sizeof(struct journal_revoke_header_t);
max = be32_to_cpu(header->r_count);
- printf("total bytes %d\n", max);
+ dbg_printf("total bytes %d\n", max);
while (offset < max) {
blocknr = be32_to_cpu(*((__be32 *)(revk_blk + offset)));
- printf("revoke blknr is %ld\n", blocknr);
+ dbg_printf("revoke blknr is %ld\n", blocknr);
offset += 4;
}
}
@@ -242,12 +242,12 @@ void ext4fs_push_revoke_blk(char *buffer)
struct revoke_blk_list *node = NULL;
struct ext_filesystem *fs = get_fs();
if (buffer == NULL) {
- printf("buffer ptr is NULL\n");
+ dbg_printf("buffer ptr is NULL\n");
return;
}
node = _get_node();
if (!node) {
- printf("_get_node: malloc failed\n");
+ dbg_printf("_get_node: malloc failed\n");
return;
}
@@ -386,9 +386,9 @@ fail:
void print_jrnl_status(int recovery_flag)
{
if (recovery_flag == RECOVER)
- printf("Journal Recovery Completed\n");
+ dbg_printf("Journal Recovery Completed\n");
else
- printf("Journal Scan Completed\n");
+ dbg_printf("Journal Scan Completed\n");
}
int ext4fs_check_journal_state(int recovery_flag)
@@ -427,10 +427,10 @@ int ext4fs_check_journal_state(int recovery_flag)
if (le32_to_cpu(fs->sb->feature_incompat) & EXT3_FEATURE_INCOMPAT_RECOVER) {
if (recovery_flag == RECOVER)
- printf("Recovery required\n");
+ dbg_printf("Recovery required\n");
} else {
if (recovery_flag == RECOVER)
- printf("File System is consistent\n");
+ dbg_printf("File System is consistent\n");
goto end;
}
@@ -662,5 +662,5 @@ void ext4fs_update_journal(void)
}
blknr = read_allocated_block(&inode_journal, jrnl_blk_idx++, NULL);
update_commit_block(blknr);
- printf("update journal finished\n");
+ dbg_printf("update journal finished\n");
}