On 07/28/2010 02:11 PM, Ivana Hutarova Varekova wrote:
> This patch add one return value check for lssubsys
>
> Signed-off-by: Ivana Hutarova Varekova<[email protected]>

Acked-By: Jan Safranek <[email protected]>

> ---
>
>   src/tools/lssubsys.c |    5 +++++
>   1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/src/tools/lssubsys.c b/src/tools/lssubsys.c
> index 89d0229..e48daa6 100644
> --- a/src/tools/lssubsys.c
> +++ b/src/tools/lssubsys.c
> @@ -195,6 +195,11 @@ static int print_all_controllers_in_hierarchy(const char 
> *tname,
>       }
>
>       ret = cgroup_get_all_controller_begin(&handle,&info);
> +     if ((ret != 0)&&  (ret != ECGEOF)) {
> +             fprintf(stderr, "cannot read controller data: %s\n",
> +                     cgroup_strerror(ret));
> +             return ret;
> +     }
>
>       while (ret != ECGEOF) {
>               /* controller is in the hierrachy */
>
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://ad.doubleclick.net/clk;226879339;13503038;l?
> http://clk.atdmt.com/CRS/go/247765532/direct/01/
> _______________________________________________
> Libcg-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libcg-devel


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to