]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
Add the parser of process name in /etc/cgrules.conf.
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Fri, 26 Jun 2009 05:49:36 +0000 (14:49 +0900)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Mon, 29 Jun 2009 10:58:38 +0000 (16:28 +0530)
commitd297b6fc17d51b8c2f6cdc094ada378d49e9a583
tree9ce840be0a666a8ad1f13756639c13c886306728
parent404007be1a80ab2ab75f64195fb692d520df0623
Add the parser of process name in /etc/cgrules.conf.

Hi,

Changelog of v6:
================
 * The definations of CGROUP_RULE_MAXKEY and CGROUP_RULE_MAXLINE are
   moved to libcgroup-internal.h since no one from outside should be
   using them.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * Use more safety length of a user name for the buffer "username".
 * Move the macros min()/max() to src/libcgroup-internal.h for using
   in src/api.c also.

Changelog of v3:
================
 * Fix unclear buffer of user by memset().

Changelog of v2:
================
 * Remove unnecessary memset().
 * Some cleanups.

Description:
============
This patch adds the parser of process name in /etc/cgrules.conf.

A new rule based on process name is as the following, and the process
name is stored into the member "procname" in struct cgroup_rule.
  <user>:<process name>  <controllers>   <destination>

Thanks
Ken'ichi Ohmichi

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