diff options
author | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-02-27 20:25:36 +0000 |
---|---|---|
committer | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-02-27 20:25:36 +0000 |
commit | 8044128fa6322f391d4629072954e24ef1c72e4f (patch) | |
tree | 00b99f9a142c379d3bf63620c8a98753cbe82172 /tests/libcg_ba.cpp | |
parent | ca75be6fc18f04a2bfac1441bc82d970832d66ea (diff) | |
download | libcg-8044128fa6322f391d4629072954e24ef1c72e4f.tar.gz libcg-8044128fa6322f391d4629072954e24ef1c72e4f.tar.xz libcg-8044128fa6322f391d4629072954e24ef1c72e4f.zip |
libcgroup test: Change dbg to cgroup_dbg
Since cgroup_dbg is defined on the basis of CGROUP_DBG, we get
libcgrouptest.h and libcg_ba.cpp to include config.h and change
dbg to cgroup_dbg.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@354 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/libcg_ba.cpp')
-rw-r--r-- | tests/libcg_ba.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/libcg_ba.cpp b/tests/libcg_ba.cpp index 6d402b6..c9994d6 100644 --- a/tests/libcg_ba.cpp +++ b/tests/libcg_ba.cpp @@ -25,6 +25,14 @@ using namespace std; #include <stdlib.h> #include <string.h> +#include "../config.h" + +#ifdef CGROUP_DBG +#define cgroup_dbg(p...) printf(p...) +#else +#define cgroup_dbg(p...) do {} while (0) +#endif + namespace cgtest { class cg { @@ -83,7 +91,7 @@ struct cgroup *cg::makenode(const string &name, const string &task_uid, return NULL; cgid = grp->gr_gid; - dbg("tuid %d, tgid %d, cuid %d, cgid %d\n", tuid, tgid, cuid, cgid); + cgroup_dbg("tuid %d, tgid %d, cuid %d, cgid %d\n", tuid, tgid, cuid, cgid); cgroup_name = (char *) malloc(name.length()); strncpy(cgroup_name, name.c_str(), name.length() + 1); |