Message ID | 1337942453-30224-2-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On Fri, May 25, 2012 at 6:40 PM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > Signed-off-by: Colin Ian King <colin.king@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 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
On 05/25/2012 06:40 PM, Colin King wrote: > From: Colin Ian King<colin.king@canonical.com> > > Signed-off-by: Colin Ian King<colin.king@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; Acked-by: Ivan Hu<ivan.hu@canonical.com>
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;