From: Ian Jackson Date: Wed, 6 Jun 2012 00:20:11 +0000 (+0100) Subject: new alarm workings X-Git-Tag: debian/4.1.31~28 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=ff6c7766afc520c1248e4abedff7a8ba474ea024 new alarm workings --- diff --git a/cprogs/xacpi-simple.c b/cprogs/xacpi-simple.c index bbdcecb..9d67c37 100644 --- a/cprogs/xacpi-simple.c +++ b/cprogs/xacpi-simple.c @@ -1,7 +1,3 @@ -/* todo - old way of doing alarm -*/ - /* * display outputs, per line: * @@ -66,7 +62,7 @@ #define TIMEOUT_ONERROR 3333 /* milliseconds */ static const char program_name[]= "xacpi-simple"; -static int debug; +static int debug, alarmlevel; /*---------- general utility stuff and declarations ----------*/ @@ -135,7 +131,8 @@ typedef struct batinfo_field { #define TYPE_BOTH 100 /* Except this is a magic invalid value. */ #define SEPARATE_QUANTITY_FIELDS(_) \ - _(alarm, BATTERY, "alarm", "0", "1") + /* See commit ec6f5f0be800bc5f2a27046833dba04e0c67ffac for + the code needed to use this */ #define ALL_DIRECT_VARS(_) \ @@ -354,7 +351,7 @@ ALL_NEEDED_FIELDS(V_NEEDED) /* These next three variables are the results of the charging state */ static unsigned charging_mask; /* 1u<