diff mbox

[2/2] blkmap64_ba: Only define ba_print_stats() when needed.

Message ID 1340794759-15286-2-git-send-email-tony@bakeyournoodle.com
State Accepted, archived
Headers show

Commit Message

Tony Breeds June 27, 2012, 10:59 a.m. UTC
If ENABLE_BMAP_STATS isn't defined make a_print_stats() do nothing.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
I copied the coding style from blkmap64_rb.c 

 lib/ext2fs/blkmap64_ba.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Theodore Ts'o July 30, 2012, 7:41 p.m. UTC | #1
On Wed, Jun 27, 2012 at 08:59:19PM +1000, Tony Breeds wrote:
> If ENABLE_BMAP_STATS isn't defined make a_print_stats() do nothing.
> 
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>

Added to the next branch of e2fsprogs.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/ext2fs/blkmap64_ba.c b/lib/ext2fs/blkmap64_ba.c
index 8eddde9..73180b0 100644
--- a/lib/ext2fs/blkmap64_ba.c
+++ b/lib/ext2fs/blkmap64_ba.c
@@ -310,12 +310,16 @@  static void ba_clear_bmap(ext2fs_generic_bitmap bitmap)
 	       (size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
 }
 
+#ifdef ENABLE_BMAP_STATS
 static void ba_print_stats(ext2fs_generic_bitmap bitmap)
 {
 	fprintf(stderr, "%16llu Bytes used by bitarray\n",
 		((bitmap->real_end - bitmap->start) >> 3) + 1 +
 		sizeof(struct ext2fs_ba_private_struct));
 }
+#else
+static void ba_print_stats(ext2fs_generic_bitmap bitmap) {}
+#endif
 
 /* Find the first zero bit between start and end, inclusive. */
 static errcode_t ba_find_first_zero(ext2fs_generic_bitmap bitmap,