libtar: use libtar tag in logging

Change-Id: I292366a237f9c8464f791d4d3cddaffc0d854577
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
(cherry picked from commit 566ef6bcaab4b038956ccff73876876aedda65eb)
diff --git a/libtar/libtar_hash.c b/libtar/libtar_hash.c
index 796ebbe..17ba854 100644
--- a/libtar/libtar_hash.c
+++ b/libtar/libtar_hash.c
@@ -122,7 +122,7 @@
 			    libtar_hashptr_t *hp)
 {
 #ifdef DS_DEBUG
-	printf("==> libtar_hash_next(h=0x%lx, hp={%d,0x%lx})\n",
+	LOG("==> libtar_hash_next(h=0x%lx, hp={%d,0x%lx})\n",
 	       h, hp->bucket, hp->node);
 #endif
 
@@ -130,7 +130,7 @@
 	    libtar_list_next(h->table[hp->bucket], &(hp->node)) != 0)
 	{
 #ifdef DS_DEBUG
-		printf("    libtar_hash_next(): found additional "
+		LOG("    libtar_hash_next(): found additional "
 		       "data in current bucket (%d), returing 1\n",
 		       hp->bucket);
 #endif
@@ -138,14 +138,14 @@
 	}
 
 #ifdef DS_DEBUG
-	printf("    libtar_hash_next(): done with bucket %d\n",
+	LOG("    libtar_hash_next(): done with bucket %d\n",
 	       hp->bucket);
 #endif
 
 	for (hp->bucket++; hp->bucket < h->numbuckets; hp->bucket++)
 	{
 #ifdef DS_DEBUG
-		printf("    libtar_hash_next(): "
+		LOG("    libtar_hash_next(): "
 		       "checking bucket %d\n", hp->bucket);
 #endif
 		hp->node = NULL;
@@ -154,7 +154,7 @@
 		    				&(hp->node)) != 0)
 		{
 #ifdef DS_DEBUG
-			printf("    libtar_hash_next(): "
+			LOG("    libtar_hash_next(): "
 			       "found data in bucket %d, returing 1\n",
 			       hp->bucket);
 #endif
@@ -165,7 +165,7 @@
 	if (hp->bucket == h->numbuckets)
 	{
 #ifdef DS_DEBUG
-		printf("    libtar_hash_next(): hash pointer "
+		LOG("    libtar_hash_next(): hash pointer "
 		       "wrapped to 0\n");
 #endif
 		hp->bucket = -1;
@@ -173,7 +173,7 @@
 	}
 
 #ifdef DS_DEBUG
-	printf("<== libtar_hash_next(): no more data, "
+	LOG("<== libtar_hash_next(): no more data, "
 	       "returning 0\n");
 #endif
 	return 0;
@@ -269,7 +269,7 @@
 			      libtar_matchfunc_t matchfunc)
 {
 #ifdef DS_DEBUG
-	printf("==> libtar_hash_getkey(h=0x%lx, hp={%d,0x%lx}, "
+	LOG("==> libtar_hash_getkey(h=0x%lx, hp={%d,0x%lx}, "
 	       "key=0x%lx, matchfunc=0x%lx)\n",
 	       h, hp->bucket, hp->node, key, matchfunc);
 #endif
@@ -278,7 +278,7 @@
 	{
 		hp->bucket = (*(h->hashfunc))(key, h->numbuckets);
 #ifdef DS_DEBUG
-		printf("    libtar_hash_getkey(): hp->bucket "
+		LOG("    libtar_hash_getkey(): hp->bucket "
 		       "set to %d\n", hp->bucket);
 #endif
 	}
@@ -286,7 +286,7 @@
 	if (h->table[hp->bucket] == NULL)
 	{
 #ifdef DS_DEBUG
-		printf("    libtar_hash_getkey(): no list "
+		LOG("    libtar_hash_getkey(): no list "
 		       "for bucket %d, returning 0\n", hp->bucket);
 #endif
 		hp->bucket = -1;
@@ -294,7 +294,7 @@
 	}
 
 #ifdef DS_DEBUG
-	printf("<== libtar_hash_getkey(): "
+	LOG("<== libtar_hash_getkey(): "
 	       "returning libtar_list_search()\n");
 #endif
 	return libtar_list_search(h->table[hp->bucket], &(hp->node),
@@ -314,25 +314,25 @@
 	int bucket, i;
 
 #ifdef DS_DEBUG
-	printf("==> libtar_hash_add(h=0x%lx, data=0x%lx)\n",
+	LOG("==> libtar_hash_add(h=0x%lx, data=0x%lx)\n",
 	       h, data);
 #endif
 
 	bucket = (*(h->hashfunc))(data, h->numbuckets);
 #ifdef DS_DEBUG
-	printf("    libtar_hash_add(): inserting in bucket %d\n",
+	LOG("    libtar_hash_add(): inserting in bucket %d\n",
 	       bucket);
 #endif
 	if (h->table[bucket] == NULL)
 	{
 #ifdef DS_DEBUG
-		printf("    libtar_hash_add(): creating new list\n");
+		LOG("    libtar_hash_add(): creating new list\n");
 #endif
 		h->table[bucket] = libtar_list_new(LIST_QUEUE, NULL);
 	}
 
 #ifdef DS_DEBUG
-	printf("<== libtar_hash_add(): "
+	LOG("<== libtar_hash_add(): "
 	       "returning libtar_list_add()\n");
 #endif
 	i = libtar_list_add(h->table[bucket], data);