summaryrefslogtreecommitdiffstats
path: root/tests/libcg_ba.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libcg_ba.cpp')
-rw-r--r--tests/libcg_ba.cpp10
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);