Skip to contentSkip to conversation

fix a couple of minor xs_tdb things

PATCH New John Levon 1 participant 1 message Oct 27, 2005

lore
Share & tools
lore

John Levon

author
#0 lore raw

PATCH 1/1 fix a couple of minor xs_tdb things

Remove the binary on make clean, and cast the field width argument to the right type for printf().

# HG changeset patch
# User [email protected]
# Node ID 8a8e25ecb86cdf7c9aaa11fabc8b42754b751ca6 # Parent 12ff3bd86d054ed4307c4056ed8185d55b93f1c6 remove xs_tdb_dump on make clean. Fix compile warnings.

tools/xenstore/Makefile +1 -0
diff -r 12ff3bd86d05 -r 8a8e25ecb86c tools/xenstore/Makefile
@@ -75,6 +75,7 @@
 	rm -f *.o *.opic *.so
 	rm -f xenstored xs_random xs_stress xs_crashme
 	rm -f xs_test xenstored_test
+	rm -f xs_tdb_dump
 	$(RM) $(PROG_DEP)
 
 print-dir:
tools/xenstore/xs_tdb_dump.c +3 -3
diff -r 12ff3bd86d05 -r 8a8e25ecb86c tools/xenstore/xs_tdb_dump.c
@@ -53,17 +53,17 @@
 		hdr = (void *)data.dptr;
 		if (data.dsize < sizeof(*hdr))
 			fprintf(stderr, "%.*s: BAD truncated\n",
-				key.dsize, key.dptr);
+				(int)key.dsize, key.dptr);
 		else if (data.dsize != total_size(hdr))
 			fprintf(stderr, "%.*s: BAD length %i for %i/%i/%i (%i)\n",
-				key.dsize, key.dptr, data.dsize,
+				(int)key.dsize, key.dptr, (int)data.dsize,
 				hdr->num_perms, hdr->datalen,
 				hdr->childlen, total_size(hdr));
 		else {
 			unsigned int i;
 			char *p;
 
-			printf("%.*s: ", key.dsize, key.dptr);
+			printf("%.*s: ", (int)key.dsize, key.dptr);
 			for (i = 0; i < hdr->num_perms; i++)
 				printf("%s%c%i",
 				       i == 0 ? "" : ",",