From 247c68bb2d60e6378845c4f060235bb1e7dc07af Mon Sep 17 00:00:00 2001 From: DarthJabba9 Date: Sun, 11 Oct 2020 16:47:56 +0100 Subject: [PATCH] Provide the option to enable debug information during tar backups Change-Id: Ibdb060d334c8f799a283f1bcef4a369d5555c975 --- libtar/Android.mk | 8 ++++++++ libtar/block.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/libtar/Android.mk b/libtar/Android.mk index 9a35c7ba..9b051e68 100755 --- a/libtar/Android.mk +++ b/libtar/Android.mk @@ -25,6 +25,10 @@ ifeq ($(TW_INCLUDE_CRYPTO_FBE), true) endif endif +ifeq ($(TW_LIBTAR_DEBUG),true) + LOCAL_CFLAGS += -DTW_LIBTAR_DEBUG +endif + include $(BUILD_SHARED_LIBRARY) # Build static library @@ -52,4 +56,8 @@ ifeq ($(TW_INCLUDE_CRYPTO_FBE), true) endif endif +ifeq ($(TW_LIBTAR_DEBUG),true) + LOCAL_CFLAGS += -DTW_LIBTAR_DEBUG +endif + include $(BUILD_STATIC_LIBRARY) diff --git a/libtar/block.c b/libtar/block.c index 81167367..6285547e 100755 --- a/libtar/block.c +++ b/libtar/block.c @@ -18,6 +18,10 @@ # include #endif +#ifdef TW_LIBTAR_DEBUG +#define DEBUG 1 +#endif + #ifdef HAVE_EXT4_CRYPT #include "ext4crypt_tar.h" #endif