diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-01-28 21:23:21 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-01-29 17:22:50 +0100 |
commit | 9d5b0c381a7961a14d2a94a6b31a4e25a2543eae (patch) | |
tree | 089a3cc96f54cd7b09762840d03e4dc2420c5ea9 /lib/common/statistics.c | |
parent | 60ff56b68ea0593782d7a2ef0ac4e667437418d2 (diff) |
Rename sqfs_data_writer_t back to sqfs_block_processor_t
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/common/statistics.c')
-rw-r--r-- | lib/common/statistics.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/common/statistics.c b/lib/common/statistics.c index 7bf8fca..b41cd22 100644 --- a/lib/common/statistics.c +++ b/lib/common/statistics.c @@ -11,7 +11,7 @@ static void post_block_write(void *user, const sqfs_block_t *block, sqfs_file_t *file) { - data_writer_stats_t *stats = user; + block_processor_stats_t *stats = user; (void)file; if (block->size == 0) @@ -28,7 +28,7 @@ static void post_block_write(void *user, const sqfs_block_t *block, static void pre_fragment_store(void *user, sqfs_block_t *block) { - data_writer_stats_t *stats = user; + block_processor_stats_t *stats = user; (void)block; stats->frag_count += 1; @@ -36,7 +36,7 @@ static void pre_fragment_store(void *user, sqfs_block_t *block) static void notify_blocks_erased(void *user, size_t count, sqfs_u64 bytes) { - data_writer_stats_t *stats = user; + block_processor_stats_t *stats = user; stats->bytes_written -= bytes; stats->blocks_written -= count; @@ -45,7 +45,7 @@ static void notify_blocks_erased(void *user, size_t count, sqfs_u64 bytes) static void notify_fragment_discard(void *user, const sqfs_block_t *block) { - data_writer_stats_t *stats = user; + block_processor_stats_t *stats = user; (void)block; stats->frag_dup += 1; @@ -59,12 +59,13 @@ static const sqfs_block_hooks_t hooks = { .notify_fragment_discard = notify_fragment_discard, }; -void register_stat_hooks(sqfs_data_writer_t *data, data_writer_stats_t *stats) +void register_stat_hooks(sqfs_block_processor_t *data, + block_processor_stats_t *stats) { - sqfs_data_writer_set_hooks(data, stats, &hooks); + sqfs_block_processor_set_hooks(data, stats, &hooks); } -void sqfs_print_statistics(sqfs_super_t *super, data_writer_stats_t *stats) +void sqfs_print_statistics(sqfs_super_t *super, block_processor_stats_t *stats) { size_t ratio; |