On 04/06/2011 10:36 AM, Jan Safranek wrote:
> hasmntopt() returns start of the matching string, i.e. when looking for
> 'cpuacct' option it can return 'cpuacct,cpuset' if these two are mounted
> together. So, don't use result of this function, use internal table of
> controllers instead when checking for duplicates.
> Signed-off-by: Jan Safranek<jsafr...@redhat.com>
Acked-by: Ivana Hutarova Varekova<varek...@redhat.com>
> ---
>
>   src/api.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/api.c b/src/api.c
> index b76b793..c3dba98 100644
> --- a/src/api.c
> +++ b/src/api.c
> @@ -817,7 +817,8 @@ int cgroup_init(void)
>                       /* do not have duplicates in mount table */
>                       duplicate = 0;
>                       for  (j = 0; j<  found_mnt; j++) {
> -                             if (strncmp(mntopt, cg_mount_table[j].name,
> +                             if (strncmp(controllers[i],
> +                                                     cg_mount_table[j].name,
>                                                       FILENAME_MAX) == 0) {
>                                       duplicate = 1;
>                                       break;
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Libcg-devel mailing list
> Libcg-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libcg-devel


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to