From: Ian Jackson Date: Wed, 6 Jun 2012 00:20:55 +0000 (+0100) Subject: some more debug X-Git-Tag: debian/4.1.31~26 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=ef732666e91759a2a4f8018c19fbf9573fdeb83b some more debug --- diff --git a/cprogs/xacpi-simple.c b/cprogs/xacpi-simple.c index 48c2ff4..52e02a2 100644 --- a/cprogs/xacpi-simple.c +++ b/cprogs/xacpi-simple.c @@ -364,6 +364,8 @@ static void acquiredata(void) { charging_mask= 0; alarmed = 0; + if (debug) printf("\n"); + #define Q_ZERO(f,t,...) \ total_##f= 0; ALL_ACCUMULATE_FIELDS(Q_ZERO) @@ -427,7 +429,9 @@ ALL_PLAIN_ACCUMULATE_FIELDS(Q_ACCUMULATE_PLAIN) } closedir(di); - printf("TOTAL:\n"); + if (debug) { + printf("TOTAL:\n"); + printf(" %-30s = %#20x\n", "mask", charging_mask); #define T_PRINT(f,...) \ printf(" %-30s = %20.6f\n", #f, total_##f); BAT_QTYS(T_PRINT,,,)