]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Fix cgroup_find_matching_rule() call.
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Tue, 30 Jun 2009 00:02:37 +0000 (09:02 +0900)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Tue, 30 Jun 2009 07:58:35 +0000 (13:28 +0530)
Hi,

If compiling the latest code (8cc1d9743201cb9ae9a5286c898b9d47e318ed46),
the following warning messages are printed. The problem is due to invalid
call of cgroup_find_matching_rule_uid_gid(). Instead of this function call,
cgroup_find_matching_rule() should be called as
"[PATCH-v6 03/11] Add the key "process name" to find a matching rule.".

 $ make
 [snip]
 api.c: In function 'cgroup_change_cgroup_flags':
 api.c:1994: warning: passing argument 3 of 'cgroup_find_matching_rule_uid_gid' from incompatible pointer type
 api.c: At top level:
 api.c:1923: warning: 'cgroup_find_matching_rule' defined but not used
 [snip]
 $

* Reference:
  "[PATCH-v6 03/11] Add the key "process name" to find a matching rule."
  http://sourceforge.net/mailarchive/message.php?msg_name=4A44617E.9060002%40mxs.nes.nec.co.jp

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
src/api.c

index ee299c69d8769d9f335155f737e33b22653b5f51..25011bbba6350456f8e0fe09d18046a3f9fa8b51 100644 (file)
--- a/src/api.c
+++ b/src/api.c
@@ -1991,7 +1991,7 @@ int cgroup_change_cgroup_flags(const uid_t uid, const gid_t gid,
                tmp = trl.head;
        } else {
                /* Find the first matching rule in the cached list. */
-               tmp = cgroup_find_matching_rule_uid_gid(uid, gid, procname);
+               tmp = cgroup_find_matching_rule(uid, gid, procname);
                if (!tmp) {
                        cgroup_dbg("No rule found to match PID: %d, UID: %d, "
                                "GID: %d\n", pid, uid, gid);