Patchwork [1/8] lib: fwts_ac_adapter.c: add more comments

login
register
mail settings
Submitter Colin King
Date May 25, 2012, 10:40 a.m.
Message ID <1337942453-30224-2-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/161278/
State Accepted
Headers show

Comments

Colin King - May 25, 2012, 10:40 a.m.
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(+)
Keng-Yu Lin - May 31, 2012, 6:48 a.m.
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>
Ivan Hu - June 1, 2012, 1:40 a.m.
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>

Patch

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;