]> git.ipfire.org Git - thirdparty/libcgroup.git/log
thirdparty/libcgroup.git
15 years agoMerge branch 'master' of ssh://libcg.git.sf.net/gitroot/libcg/libcg
Balbir Singh [Mon, 7 Jun 2010 10:35:42 +0000 (16:05 +0530)] 
Merge branch 'master' of ssh://libcg.git.sf.net/gitroot/libcg/libcg

15 years agov0.36.2.rc
Dhaval Giani [Fri, 4 Jun 2010 11:42:29 +0000 (13:42 +0200)] 
v0.36.2.rc

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: open files with O_CLOEXEC
Dhaval Giani [Fri, 4 Jun 2010 11:30:59 +0000 (13:30 +0200)] 
libcgroup: open files with O_CLOEXEC

We don't want file handles to remain open across execs.
Therefore open files with the O_CLOEXEC flag which closes
the files on exec.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Do not call exit from within the main library
Dhaval Giani [Fri, 4 Jun 2010 11:30:58 +0000 (13:30 +0200)] 
libcgroup: Do not call exit from within the main library

The autogenerated code fromt the lexer was calling exit on a
fatal error. Do not do that. Instead log the message.

While it is still not clear if this is the correct response
for YY_FATAL_ERROR, we need to gracefully handle errors, and
since this is a path which is very rarely hit, this is still
a low risk change and so we will merge it.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoAdd configure option to set destination directory of pam module.
Jan Safranek [Mon, 31 May 2010 15:15:22 +0000 (17:15 +0200)] 
Add configure option to set destination directory of pam module.

Add configure option to set destination directory of pam module. The module
can be used right after 'make install', no moving of libraries is required.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoMake the installation of init scripts optional
Jan Safranek [Mon, 31 May 2010 15:15:15 +0000 (17:15 +0200)] 
Make the installation of init scripts optional

Some distros do not like 'make install' to install also initscripts. So
let's make it configurable with --enable-initscripts-install.

The default behavior is not to install them - they probably work only on
Fedora.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoRework the way how the libraries are installed.
Jan Safranek [Mon, 31 May 2010 15:15:08 +0000 (17:15 +0200)] 
Rework the way how the libraries are installed.

As pointed out by Kay Sievers on IRC, the pkgconfig file should point to
/usr/lib, where libcgroup.so symlink is located, not to /lib, where is the
real library libcgroup.so.1.0.36.

Therefore it's better to install libraries to /usr/lib, which generated
the right libcgroup.pc and then move all necessary libs to /lib.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Return correct values in parse.y
Dhaval Giani [Tue, 1 Jun 2010 15:36:38 +0000 (17:36 +0200)] 
libcgroup: Return correct values in parse.y

Instead of returning a valid error on failure in parse.y, we
were returning 0. Fix that up.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoreplace /etc with $(sysconfdir) to pass 'make distcheck'
Kay Sievers [Mon, 31 May 2010 22:07:28 +0000 (00:07 +0200)] 
replace /etc with $(sysconfdir) to pass 'make distcheck'

Distcheck checks for correct use of DESTDIR and prefix. We need to
include a path that contains prefix instead of plain /etc.

Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Dhaval Giani <dhaval@gondor.retis>
15 years agoadd generated file to CLEANFILES
Kay Sievers [Mon, 31 May 2010 15:21:32 +0000 (17:21 +0200)] 
add generated file to CLEANFILES

Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Dhaval Giani <dhaval@gondor.retis>
15 years agosrcdir -> builddir to fix 'make distcheck'
Kay Sievers [Mon, 31 May 2010 15:08:38 +0000 (17:08 +0200)] 
srcdir -> builddir to fix 'make distcheck'

Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Dhaval Giani <dhaval@gondor.retis>
15 years agodepend on parse.h to allow 'make -j'
Kay Sievers [Mon, 31 May 2010 14:53:53 +0000 (16:53 +0200)] 
depend on parse.h to allow 'make -j'

Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Dhaval Giani <dhaval@gondor.retis>
15 years agoAdd several man-pages to their Makefile
Ivana Hutarova Varekova [Wed, 26 May 2010 09:30:49 +0000 (11:30 +0200)] 
Add several man-pages to their Makefile

This patch adds several man-pages which already are in git to
Makefile.

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@gondor.retis>
15 years agov0.36.1 v0.36.1
Dhaval Giani [Fri, 21 May 2010 12:31:01 +0000 (14:31 +0200)] 
v0.36.1

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agov0.36.1.rc1
Dhaval Giani [Tue, 18 May 2010 13:30:42 +0000 (15:30 +0200)] 
v0.36.1.rc1

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcg trivial compile errors/warnings
Kay Sievers [Tue, 18 May 2010 05:23:17 +0000 (07:23 +0200)] 
libcg trivial compile errors/warnings

libcgroup: Fix a few cosmetic issues and missing include

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoMerge branch 'master' of ssh://libcg.git.sf.net/gitroot/libcg/libcg
Balbir Singh [Tue, 18 May 2010 13:23:04 +0000 (18:53 +0530)] 
Merge branch 'master' of ssh://libcg.git.sf.net/gitroot/libcg/libcg

15 years agolibcgroup tests: Fix build issue with the named hierarchy test case
Dhaval Giani [Mon, 17 May 2010 22:30:12 +0000 (00:30 +0200)] 
libcgroup tests: Fix build issue with the named hierarchy test case

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agov0.36 v0.36
Dhaval Giani [Mon, 17 May 2010 21:53:33 +0000 (23:53 +0200)] 
v0.36

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Test the modified cgroup_init
Dhaval Giani [Mon, 17 May 2010 16:54:49 +0000 (18:54 +0200)] 
libcgroup: Test the modified cgroup_init

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Add support for named hierarchies.
Dhaval Giani [Mon, 17 May 2010 16:54:48 +0000 (18:54 +0200)] 
libcgroup: Add support for named hierarchies.

This feature has been available in the kernel for sometime, but was missed by
libcgroup.

Add support for named hierarchies. The controller is identified as
name=<name> and used in such fashion.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Introduce cgroup_basename and modify the functions to use it.
Dhaval Giani [Mon, 17 May 2010 16:15:59 +0000 (18:15 +0200)] 
libcgroup: Introduce cgroup_basename and modify the functions to use it.

basename() is not safe as it modifies the pointers from time to time.

In order to prevent it, write a safe version of basename which uses basename
internally.

As a side effect, it also clears up the following warning,

api.c: In function ‘cgroup_find_matching_rule’:
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’
api.c:2201: warning: passing argument 1 of ‘__xpg_basename’ discards qualifiers from pointer target type
/usr/include/libgen.h:35: note: expected ‘char *’ but argument is of type ‘const char *’

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Fix warnings warning about comparisions between signed and unsigned integers
Dhaval Giani [Mon, 17 May 2010 16:15:58 +0000 (18:15 +0200)] 
libcgroup: Fix warnings warning about comparisions between signed and unsigned integers

Fix warnings such as

api.c:539: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
api.c:539: warning: signed and unsigned type in conditional expression [-Wsign-compare]

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Fix warnings warning of shadowed declaration
Dhaval Giani [Mon, 17 May 2010 16:15:57 +0000 (18:15 +0200)] 
libcgroup: Fix warnings warning of shadowed declaration

Fixes warnings such as

api.c:2764: warning: declaration of ‘stat’ shadows a global declaration [-Wshadow]
/usr/include/sys/stat.h:453: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Fix warnings warning about mixed declarations
Dhaval Giani [Mon, 17 May 2010 16:15:56 +0000 (18:15 +0200)] 
libcgroup: Fix warnings warning about mixed declarations

Fix warnings like

api.c: In function ‘cgroup_walk_tree_begin’:
api.c:2647: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: cast CGRULE macros to uid_t
Dhaval Giani [Mon, 17 May 2010 16:15:55 +0000 (18:15 +0200)] 
libcgroup: cast CGRULE macros to uid_t

Clears up a few warnings.

api.c:2366: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
api.c:2368: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
api.c:2373: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
api.c:2375: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Compress the large_cgconfig.conf file
Dhaval Giani [Thu, 6 May 2010 15:47:57 +0000 (17:47 +0200)] 
libcgroup: Compress the large_cgconfig.conf file

The large_cgconfig.conf file is 276kb in size. Compress it
so that it takes lesser space.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoAllow cgroup_config_table to be dynamically handled
Balbir Singh [Fri, 30 Apr 2010 17:23:18 +0000 (22:53 +0530)] 
Allow cgroup_config_table to be dynamically handled

Allow cgconfigparser to create groups > MAX_GROUPS

From: Balbir Singh <balbir@linux.vnet.ibm.com>

Rafael Tinoco <rafael.tinoco@locaweb.com.br> noticed that the maximum
number of cgroups created using cgconfigparser fell short of 2000. Balbir
found a limitation in the code, that limited this number to a predefined
maximum. This patch fixes the limitation, although not in the most
optimized way, since we want to avoid double parsing of the configuraiton
file.

This patch realloc's the data structure that holds parsed cgroups.

Tested via setting MAX_CGROUPS=1 and loading a configuration file with
2 groups defined. Also tested with a large cgroup file

Test results after loading large_cgconfig.conf (generated using a
script). The size is large, but I wanted to send out the test case
since it adds to our regression bucket.

#subsys_name    hierarchy       num_cgroups     enabled
cpuset  0       1       1
ns      0       1       1
cpu     1       2021    1
cpuacct 1       2021    1
memory  2       2021    1
devices 0       1       1
freezer 0       1       1
net_cls 0       1       1

NOTE: Be careful, such a large number of groups could slow
down your system. This needs further investigation at the cgroups
layer in the kernel.

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agomanpages: Fix whitespace in cgred.conf manpage
Dhaval Giani [Thu, 6 May 2010 12:46:12 +0000 (14:46 +0200)] 
manpages: Fix whitespace in cgred.conf manpage

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoSeveral man-page fixes
Ivana Hutarova Varekova [Thu, 6 May 2010 12:44:48 +0000 (14:44 +0200)] 
Several man-page fixes

This patch fixes several man pages (typos, syntax problems)

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoUse int for getopt() results
Jan Safranek [Mon, 12 Apr 2010 10:49:08 +0000 (12:49 +0200)] 
Use int for getopt() results

On ppc, char is unsigned and getopt()/getopt_long() returning -1 (= end of
arguments) is translated to 255 and results in 'Invalid command line option'.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoMerge branch 'master' of ssh://libcg.git.sf.net/gitroot/libcg/libcg
Balbir Singh [Tue, 30 Mar 2010 15:06:17 +0000 (20:36 +0530)] 
Merge branch 'master' of ssh://libcg.git.sf.net/gitroot/libcg/libcg

15 years agoMerge branch 'devel/doxygen3' of git://fedorapeople.org/~jsafrane/libcg
Dhaval Giani [Mon, 29 Mar 2010 10:29:22 +0000 (12:29 +0200)] 
Merge branch 'devel/doxygen3' of git://fedorapeople.org/~jsafrane/libcg

15 years agoAdd documentation main page
Jan Safranek [Mon, 29 Mar 2010 10:07:00 +0000 (12:07 +0200)] 
Add documentation main page

Add very simple main page to include/libcgroup.h. It contains just very
basic info and links to the other modules. Feel free to elaborate more on
this, it could contain lot more:
 - how to complie with libcgroup (=pkgconfig)?
 - how to report errors
 - links to samples
 - link to home page
 - info about threading
 etc.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agoDocument the tasks.h
Jan Safranek [Mon, 29 Mar 2010 10:05:11 +0000 (12:05 +0200)] 
Document the tasks.h

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agoUpdate config.h
Jan Safranek [Mon, 29 Mar 2010 10:00:42 +0000 (12:00 +0200)] 
Update config.h

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agoDocument the iterators
Jan Safranek [Mon, 29 Mar 2010 10:00:42 +0000 (12:00 +0200)] 
Document the iterators

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agoAdd doc to include/libcgroup/error.h
Jan Safranek [Mon, 29 Mar 2010 10:00:42 +0000 (12:00 +0200)] 
Add doc to include/libcgroup/error.h

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agoAdd documentation to include/libcgroup/init.h
Jan Safranek [Mon, 29 Mar 2010 10:00:42 +0000 (12:00 +0200)] 
Add documentation to include/libcgroup/init.h

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agoDocument include/libcgroup/groups.h
Jan Safranek [Mon, 29 Mar 2010 10:00:42 +0000 (12:00 +0200)] 
Document include/libcgroup/groups.h

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agoUpdate doxygen config file
Jan Safranek [Mon, 29 Mar 2010 10:00:41 +0000 (12:00 +0200)] 
Update doxygen config file

Update doxygen config file to 1.6.1 + add comments + change following
settings:

OUTPUT_DIRECTORY = doc/generated
ALWAYS_DETAILED_SEC = YES - we want all function in detailed list
JAVADOC_AUTOBRIEF = YES - IMHO the least painfull way to extract brief
desxcription, see doxygen docs for the other ways. But still painful enough :(
OPTIMIZE_OUTPUT_FOR_C  = YES - we're C project
IDL_PROPERTY_SUPPORT   = NO - we're C project
WARN_NO_PARAMDOC = YES - document all function parameters please!
INPUT = include - generate public docs only
GENERATE_LATEX = NO - no LaTeX for now, maybe later
*_GRAPH = NO - no call/include graphs in public docs

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agolibcgroup: Fix coding style issues in config.c
Dhaval Giani [Fri, 26 Mar 2010 14:04:36 +0000 (15:04 +0100)] 
libcgroup: Fix coding style issues in config.c

Pre:
total: 1 errors, 10 warnings, 817 lines checked

Post:
total: 0 errors, 4 warnings, 818 lines checked

Unfixed warnings are because they break text and therefore capabilities
to easily grep through.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Fix up coding style in wrapper.c
Dhaval Giani [Fri, 26 Mar 2010 14:04:35 +0000 (15:04 +0100)] 
libcgroup: Fix up coding style in wrapper.c

Pre:
total: 0 errors, 3 warnings, 638 lines checked

Post:
total: 0 errors, 0 warnings, 640 lines checked

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Dont assign values to variables inside if conditions
Dhaval Giani [Fri, 26 Mar 2010 14:04:34 +0000 (15:04 +0100)] 
libcgroup: Dont assign values to variables inside if conditions

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Fix coding style issues in api.c
Dhaval Giani [Fri, 26 Mar 2010 14:04:33 +0000 (15:04 +0100)] 
libcgroup: Fix coding style issues in api.c

Pre this patch
total: 16 errors, 40 warnings, 3321 lines checked

Post this patch
total: 2 errors, 5 warnings, 3323 lines checked

The remaining errors will cause a code change, and so go in a separate patch.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agodon't export functions that should not be exported
Lennart Poettering [Wed, 24 Mar 2010 20:05:23 +0000 (21:05 +0100)] 
don't export functions that should not be exported

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agocgget: properly use binary & instead of boolean && when checking for flags
Lennart Poettering [Wed, 24 Mar 2010 20:05:08 +0000 (21:05 +0100)] 
cgget: properly use binary & instead of boolean && when checking for flags

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoconfig: don't implicitly import cgroup_config_cleanup_namespace_table(), this is...
Lennart Poettering [Wed, 24 Mar 2010 20:04:54 +0000 (21:04 +0100)] 
config: don't implicitly import cgroup_config_cleanup_namespace_table(), this is not K&R C anymore...

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoapi: don't keep one copy of the mount table per .c file
Lennart Poettering [Wed, 24 Mar 2010 20:04:36 +0000 (21:04 +0100)] 
api: don't keep one copy of the mount table per .c file

The mount table variables need to be declared in the header file and
defined in the .c file. If we don't do that every .o file will end up
with its own copy of those variables.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agounexport a couple of variables that don't need to be exported
Lennart Poettering [Wed, 24 Mar 2010 20:04:22 +0000 (21:04 +0100)] 
unexport a couple of variables that don't need to be exported

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agopkg-config: hide .pc file from git
Lennart Poettering [Wed, 24 Mar 2010 20:04:09 +0000 (21:04 +0100)] 
pkg-config: hide .pc file from git

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoapi: bzero is obsolete BSD, use memset instead
Lennart Poettering [Wed, 24 Mar 2010 20:03:56 +0000 (21:03 +0100)] 
api: bzero is obsolete BSD, use memset instead

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoconfig: pass struct as const call-by-ref instead of call-by-value, to minimize copying
Lennart Poettering [Wed, 24 Mar 2010 20:03:42 +0000 (21:03 +0100)] 
config: pass struct as const call-by-ref instead of call-by-value, to minimize copying

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoconfig: use macros instead of arrays for const strings
Lennart Poettering [Wed, 24 Mar 2010 20:03:24 +0000 (21:03 +0100)] 
config: use macros instead of arrays for const strings

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agomake functions without arguments proper C99 functions
Lennart Poettering [Wed, 24 Mar 2010 20:03:04 +0000 (21:03 +0100)] 
make functions without arguments proper C99 functions

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoadd a couple of FIXMEs to broken code
Lennart Poettering [Wed, 24 Mar 2010 19:59:42 +0000 (20:59 +0100)] 
add a couple of FIXMEs to broken code

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoadd const where applicable, drop const where unnecessary
Lennart Poettering [Wed, 24 Mar 2010 18:06:49 +0000 (19:06 +0100)] 
add const where applicable, drop const where unnecessary

This patch adds the const qualifier to a number of function arguments
(mostly string arguments) so that client libraries can pass their own
const strings to the library without having to cast their const'ness
away.

This also drops a couple of consts where call-by-value is done anyway,
and which hence has no effect and just misleads the users and adds
unnecessary noise to the signal. After all this is C, not C++.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoMerge branch 'master' of ssh://libcg.git.sf.net/gitroot/libcg/libcg
Balbir Singh [Thu, 25 Mar 2010 06:11:05 +0000 (11:41 +0530)] 
Merge branch 'master' of ssh://libcg.git.sf.net/gitroot/libcg/libcg

15 years agogit: hide all generated files from git
Lennart Poettering [Wed, 24 Mar 2010 14:53:05 +0000 (15:53 +0100)] 
git: hide all generated files from git

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Reviewed-By: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoinclude: refuse inclusion of seperate header files
Lennart Poettering [Wed, 24 Mar 2010 14:51:55 +0000 (15:51 +0100)] 
include: refuse inclusion of seperate header files

Later on it might make sense to move around function definitions between
header files. Hence make sure that nobody includes any header file
directly except the main one.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Reviewed-By: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agobuild-sys: add bootstrap.sh
Lennart Poettering [Wed, 24 Mar 2010 14:52:23 +0000 (15:52 +0100)] 
build-sys: add bootstrap.sh

Most projects carry a bootstrap.sh/autogen.sh file that calls the
autotools in the right order.

This bootstrap.sh also enables the default git commit hook which
enforces a strict kernel-like whitespace regime.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agobuild-sys: enable silent build by default
Lennart Poettering [Wed, 24 Mar 2010 14:51:38 +0000 (15:51 +0100)] 
build-sys: enable silent build by default

Make the automake output a bit more like the kbuild output if supported.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Add pkg-config data
Dhaval Giani [Thu, 18 Feb 2010 14:56:31 +0000 (15:56 +0100)] 
libcgroup: Add pkg-config data

libcgroup was not making an entry into the pkg-config database, which
makes life easier when using multiple libraries. Add the needed data
in order to be registered with the pkg-config database on installation.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
Reviewed-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Lennart Poettering <lennnart@poettering.net>
15 years agolibcgroup: Version bump to v0.36.rc1
Dhaval Giani [Thu, 18 Feb 2010 14:56:30 +0000 (15:56 +0100)] 
libcgroup: Version bump to v0.36.rc1

We are now making changes to the specfile, which needs a version
bump. Bump up the version to v0.36.rc1.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoFix typo in wrapper.c (cgroup_get_uid_gid)
Balbir Singh [Wed, 24 Mar 2010 07:18:45 +0000 (12:48 +0530)] 
Fix typo in wrapper.c (cgroup_get_uid_gid)

Fix the typo in our cgroup_get_uid_gid routine
We seem to have a typo in the function, the fix is quite obvious.

Reported-by: Ciju Rajan K <ciju@linux.vnet.ibm.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoFix the typo in our cgroup_get_uid_gid routine
Balbir Singh [Wed, 24 Mar 2010 07:17:11 +0000 (12:47 +0530)] 
Fix the typo in our cgroup_get_uid_gid routine

Reported-by: Ciju Rajan K <ciju@linux.vnet.ibm.com>
We seem to have a typo in the function, the fix is quite obvious.

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoSplit header file III
Jan Safranek [Fri, 12 Mar 2010 15:50:20 +0000 (16:50 +0100)] 
Split header file III

Changelog:
 - since there are no global macros, base.h is gone
 - since there is no base.h, all headers need to include <features.h> to get
   __BEGIN_DECLS
 - new init.h with cgroup_init() and cgroup_get_subsys_mount_point()
 - new error.h with error handling enum and related stuff
 - use #ifndef _LIBCGROUP_*_H instead _LIBCG_*_H in header guards
 - fix few checkpatch complaints (long lines, whitespaces, ...)

The patch includes Makefile and .spec changes. I tested it compiles,
make dist produces tarball with all headers, so does also the rpm.
'make' should automatically catch all changes in new headers and
recompile dependent (=all) sources when any header changes.

libcgroup.h
  - does not declare anything, it just includes all the other files. In
    future, it might contain base of doxygen documentation (some
    introduction etc.)

libcgroup/error.h
  - the big enum with errors + error related functions

libcgroup/init.h
  - libcgroup_init() and cgroup_get_subsys_mount_point()

libcgroup/config.h
  - configuration reading/unloading

libcgroup/groups.h
  - group manipulation stuff (create/modify/delete/free, incl. controllers and
    get/set values) + definition of struct cgroup (=must be included by
    libcgroup/tasks.h, which needs it)

libcgroup/iterators.h
  - various walks, *_begin/next/end

libcgroup/tasks.h
  - task classification, incl. rules cache manipulation

In addition, I probably removed some #includes, which are not needed now when
looking for the minimal #include set to build the project. I also hope I did not
miss any function declaration or macro...

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoMove private definitions to private header
Jan Safranek [Fri, 12 Mar 2010 15:50:10 +0000 (16:50 +0100)] 
Move private definitions to private header

Most of the macro definitions in licgroup.h are internal, let's move them
to private header. Applications should not depend on them. The only one
really needed is CG_VALUE_MAX, which is used in struct cgroup_stat.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoAnonymize error enum
Jan Safranek [Fri, 12 Mar 2010 15:50:01 +0000 (16:50 +0100)] 
Anonymize error enum

The enum with ECG* error codes should be anonymous, as pointed out by
Lennart Poettering.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoUse memset to initialize sigaction struct
Jon Bernard [Tue, 9 Mar 2010 21:10:39 +0000 (16:10 -0500)] 
Use memset to initialize sigaction struct

The sa_restorer field is not present on some architectures, like alpha.
By using memset, the structure is initialized appropriately regardless of
struct contents.

Signed-off-by: Jon Bernard <jbernard@debian.org>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agorpm spec file misses the sysconfig/cgconfig file
Chris [Tue, 9 Mar 2010 16:09:48 +0000 (11:09 -0500)] 
rpm spec file misses the sysconfig/cgconfig file

The /etc/sysconfig/cgconfig file is never installed with the current RPM
spec file. This fixes it for me:

Signed-off-by: Chris Tasma <chris@deksai.com>
Reviewed-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoinit script can miss default group
Chris [Tue, 9 Mar 2010 16:04:46 +0000 (11:04 -0500)] 
init script can miss default group

If there is a directive like *:httpd before * in the cgconfig file, all
processes end up being moved into the wrong group on cgconfig startup, and
the default group is never made. This fixes it for me:

Signed-off-by: Chris Tasma <chris@deksai.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoMake the error stings const
Jan Safranek [Mon, 8 Mar 2010 11:46:11 +0000 (12:46 +0100)] 
Make the error stings const

Make the error stings const, just to be safe.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoRemove last_errno from public header
Jan Safranek [Mon, 8 Mar 2010 11:46:04 +0000 (12:46 +0100)] 
Remove last_errno from public header

Remove last_errno from public header, that's why we have cgroup_get_last_errno.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoRemove GNU_SOURCE from public headers
Jan Safranek [Mon, 8 Mar 2010 11:45:57 +0000 (12:45 +0100)] 
Remove GNU_SOURCE from public headers

Remove GNU_SOURCE from public headers, it has unpredictable consequences on
applications using libcgroup.h

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agolibcgroup: Add a gitignore file
Dhaval Giani [Wed, 17 Feb 2010 16:26:05 +0000 (17:26 +0100)] 
libcgroup: Add a gitignore file

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agofix cgroup_get_value_string problem with *.stat output
Ivana Hutarova Varekova [Mon, 8 Feb 2010 12:32:41 +0000 (13:32 +0100)] 
fix cgroup_get_value_string problem with *.stat output

fix cgroup_get_value_string problem with *.stat output
the problem was in the low limit for value for the output of stat variables - now there are used the functions cgroup_read_stats_{begin/next/end} for this purpose

bogus output:
./src/tools/cgget -r memory.stat /
/:
memory.stat=cache 1024561152
rss 291270656
pgpgin 1209259
pgpgout 888011
inactive_anon 8192
active_anon 2976481

fixed output:
$ ./src/tools/cgget -r memory.stat /
/:
memory.stat=cache 1024610304
rss 291270656
pgpgin 1209271
pgpgout 888011
inactive_anon 8192
active_anon 297648128
inactive_file 619126784
active_file 399073280
unevictable 24576
hierarchical_memory_limit 9223372036854775807
hierarchical_memsw_limit 9223372036854775807
total_cache 1024610304
total_rss 291270656
total_pgpgin 1209271
total_pgpgout 888011
total_inactive_anon 8192
total_active_anon 297648128
total_inactive_file 619126784
total_active_file 399073280
total_unevictable 24576

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoThis patch adds to cgget option -a:
Ivana Hutarova Varekova [Mon, 8 Feb 2010 12:32:26 +0000 (13:32 +0100)] 
This patch adds to cgget option -a:

v2:
removed bunch of unnecessary error messages
This patch adds to cgget option -a:
-a     print the variables for all controllers which consists given cgroup

EXAMPLE:
$ ./cgget -a /daemons
/daemons:
cpuset.memory_spread_slab=0
cpuset.memory_spread_page=0
cpuset.memory_pressure=0
cpuset.memory_migrate=0
cpuset.sched_relax_domain_level=-1
cpuset.sched_load_balance=1
cpuset.mem_hardwall=0
cpuset.mem_exclusive=0
cpuset.cpu_exclusive=0
cpuset.mems=
cpuset.cpus=
cpuacct.stat=user 0
system 0
cpuacct.usage_percpu=0 0
cpuacct.usage=0

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoadds new option -g to cgget command
Ivana Hutarova Varekova [Mon, 8 Feb 2010 12:32:18 +0000 (13:32 +0100)] 
adds new option -g to cgget command

adds new option -g to cgget command
* the option has one argument - controller
* cgget -g devices / returns the values of all variables of controller
devices
* the option could be used multiple times

EXAMLES:

$ ./cgget -n -g cpu -r cpuset.mems /
cpu.rt_period_us=1000000
cpu.rt_runtime_us=950000
cpu.shares=1024
cpuset.mems=0

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoThis is the test program for listing controller variables
Ivana Hutarova Varekova [Mon, 8 Feb 2010 12:31:56 +0000 (13:31 +0100)] 
This is the test program for listing controller variables

This is the test program for new internal functions:

    int cgroup_get_value_name_count(struct cgroup_controller *controller)
    char *cgroup_get_value_name(struct cgroup_controller *controller, int     index)

The program display the variables of input controllers.

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoapi for generating the list of variables of given controller
Ivana Hutarova Varekova [Mon, 8 Feb 2010 12:31:47 +0000 (13:31 +0100)] 
api for generating the list of variables of given controller

api for generating the list of variables of given controller:
changelog - v2:
fixed the space on the end of lines

  * int cgroup_get_value_name_count(struct cgroup_controller,  *controller)
  functions return the number of variables in "controller"

  * char *cgroup_get_value_name(struct cgroup_controller *controller, int index)
  function return the "index" variable of "controller"

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoRelease procedure proposal
Jan Safranek [Mon, 8 Feb 2010 13:13:18 +0000 (14:13 +0100)] 
Release procedure proposal

this is my proposal for release procedure - it's quite simple and covers all
the technical details you need to know regarding autotools.

Changelog:
- re-diff with current master (and not my internal branch :)
- renumber the steps

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years ago[PATCH-v2] Add the write error handling to cg_set_control_value().
Ken'ichi Ohmichi [Thu, 28 Jan 2010 05:45:48 +0000 (11:15 +0530)] 
[PATCH-v2] Add the write error handling to cg_set_control_value().

Changelog since v1:
 o Use fopen/fprintf/fclose instead of open/write/close.
 o Add the error handling against fclose.

cg_set_control_value() is the function for setting a value to a file
of cgroup file system. And current function does not handle the error
of writing to a file. So we cannot know whether setting value is
enable or not. This patch add the error handling for knowing it.

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoMerge branch 'HEAD'; commit 'v0.35.1'
Balbir Singh [Tue, 19 Jan 2010 12:11:44 +0000 (17:41 +0530)] 
Merge branch 'HEAD'; commit 'v0.35.1'

15 years agoUpdate the changelog in libcgroup.spec.in v0.35.1
Balbir Singh [Tue, 19 Jan 2010 11:46:36 +0000 (17:16 +0530)] 
Update the changelog in libcgroup.spec.in
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoFix initstripts directory.
Jan Safranek [Mon, 18 Jan 2010 12:15:16 +0000 (13:15 +0100)] 
Fix initstripts directory.

Put initscipts to /etc/rc.d/init.d, rpm's %{_initrddir} points there.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoFix bad filename in Makefile
Jan Safranek [Mon, 18 Jan 2010 12:15:09 +0000 (13:15 +0100)] 
Fix bad filename in Makefile

Fix bad filename in Makefile and make 'make dist' working again.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agoDistribute cgget tool
Jan Safranek [Mon, 18 Jan 2010 12:15:02 +0000 (13:15 +0100)] 
Distribute cgget tool

Distribute cgget tool in rpms.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agov0.35 v0.35
Dhaval Giani [Mon, 18 Jan 2010 17:16:21 +0000 (18:16 +0100)] 
v0.35

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
15 years agoAdd cgget man page.
Jan Safranek [Mon, 18 Jan 2010 11:13:48 +0000 (16:43 +0530)] 
Add cgget man page.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agolibcgroup samples: Invalid namespace configuration
Dhaval Giani [Thu, 7 Jan 2010 10:54:38 +0000 (16:24 +0530)] 
libcgroup samples: Invalid namespace configuration

An invalide namespace configuration. This configuration is invalid
because while cpu and cpuacct have been mounted at the same point,
they have different namespaces.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
15 years agolibcgroup samples: Valid namespace based configuration
Dhaval Giani [Thu, 7 Jan 2010 10:54:37 +0000 (16:24 +0530)] 
libcgroup samples: Valid namespace based configuration

Change from v2:
1. Correct the changes made in the config file format. namespace and
mount not in the same file.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
15 years agolibcgroup: Modify the APIs to use the namespace
Dhaval Giani [Thu, 7 Jan 2010 10:54:36 +0000 (16:24 +0530)] 
libcgroup: Modify the APIs to use the namespace

Since every API builds its patch via build_path, updating that
function should be enough.

Changes from v1:
1. Append the namespace only if it is defined. This will remove an
additional "/" which would be introduced otherwise.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
15 years agolibcgroup: Setup the namespace datastructures
Dhaval Giani [Thu, 7 Jan 2010 10:54:35 +0000 (16:24 +0530)] 
libcgroup: Setup the namespace datastructures

This patch handles the validation of the newer configuration files.

Some of the rules to be followed
1. We cannot have more controllers in the namespcae section than
already mounted.
2. If more than one controller are mounted at the same point, then
they will have the same namespace. In case it is not explicitly
mentioned, the subsystems at the mount point will be set to the
same namespace. This does not mean that controllers mounted at different
points need to have the same namespace.

Changes from v4:
1. Changed a variable name from mount to mount_path
2. Added more comments

Changes from v3:
1. Removed most of the strdups
2. Fixed return values for errors

Changes from v2:
1. mount and namespace keyword cannot come in the same file.

Changes from v1:
1. Fix a bug where if a namespace was not defined, we were not exiting
2. Comment the validate namespace function
3. Make some of the variables more descriptive
4. Make namespace thread specific

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
15 years agolibcgroup: Introduce the new namespace keyword
Dhaval Giani [Thu, 7 Jan 2010 10:54:34 +0000 (16:24 +0530)] 
libcgroup: Introduce the new namespace keyword

This patch introduces a new keywork NAMESPACE which allow cgroups
to be created starting from a certain point as mentioned by the
administrator. This is provided via the configuration file.

Newer APIs will use this feature.

Changes from v1:
1. Attempted to fix the indentation
2. Change a variable name

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
15 years agolibcgroup: Remove assert in cgroup_strerror()
Dhaval Giani [Mon, 4 Jan 2010 12:34:42 +0000 (18:04 +0530)] 
libcgroup: Remove assert in cgroup_strerror()

Since we add new errors after ECGSENTINEL, it makes no
sense to have the assert in place. Remove the assert.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
15 years agoMerge branch 'devel/config3' of git://fedorapeople.org/~jsafrane/libcg
Dhaval Giani [Wed, 23 Dec 2009 13:04:45 +0000 (18:34 +0530)] 
Merge branch 'devel/config3' of git://fedorapeople.org/~jsafrane/libcg

* 'devel/config3' of git://fedorapeople.org/~jsafrane/libcg:
  Clean up the init script
  Use tools instead of shell scripts
  Make cgclear quiert when there is nothing to clear.
  Use cgclear on shutdown
  Add sample /etc/sysconfig/cgconfig
  Don't create sysdefault group whent it's not needed
  Move sysdefault handling to separate function
  Remove trailing space from lssubsys output
  Fix reading of empty parameter values
  Fix error text on failed reading of parameter.
  cgget tool

15 years agoClean up the init script
Jan Safranek [Tue, 22 Dec 2009 08:24:52 +0000 (09:24 +0100)] 
Clean up the init script

Some parts of the init script are not needed with the recent changes.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
15 years agoUse tools instead of shell scripts
Jan Safranek [Tue, 22 Dec 2009 08:24:25 +0000 (09:24 +0100)] 
Use tools instead of shell scripts

libcgroup now provides some tools, which can be used in the init script
instead of bash code.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
15 years agoMake cgclear quiert when there is nothing to clear.
Jan Safranek [Tue, 22 Dec 2009 08:24:04 +0000 (09:24 +0100)] 
Make cgclear quiert when there is nothing to clear.

Cgclear clears and unmounts all controllers. Therefore I think it's not an
error when there is nothing to clear and unmount.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>