[PATCH 1/8] lib: fwts_ac_adapter.c: add more comments
Colin King
colin.king at canonical.com
Fri May 25 10:40:46 UTC 2012
From: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/lib/src/fwts_ac_adapter.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/lib/src/fwts_ac_adapter.c b/src/lib/src/fwts_ac_adapter.c
index 3dfdf49..be07be8 100644
--- a/src/lib/src/fwts_ac_adapter.c
+++ b/src/lib/src/fwts_ac_adapter.c
@@ -59,6 +59,17 @@ static fwts_ac_interface_info fwts_ac_interfaces[] = {
}
};
+/*
+ * fwts_ac_adapter_get_state()
+ * fetch count of matching and non-matching instances of
+ * AC adapter state, state can be:
+ * FWTS_AC_ADAPTER_ONLINE - connected to AC adapter
+ * FWTS_AC_ADAPTER_OFFLINE - not connected to AC adapter
+ * FWTS_AC_ADAPTER_ANY - either of above
+ * matching is incremented for each AC adapter instance that matches
+ * not_matching is incremented for each AC adapter instance that does
+ * not match.
+ */
int fwts_ac_adapter_get_state(int state, int *matching, int *not_matching)
{
DIR *ac_power_dir;
--
1.7.10
More information about the fwts-devel
mailing list