summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/libcgroup.h19
-rw-r--r--src/libcgroup-internal.h19
-rw-r--r--src/tools/lssubsys.c1
-rw-r--r--src/tools/tools-common.h1
4 files changed, 21 insertions, 19 deletions
diff --git a/include/libcgroup.h b/include/libcgroup.h
index b5d7a42..b7d997b 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -26,22 +26,11 @@ __BEGIN_DECLS
#include <sys/types.h>
#include <linux/cn_proc.h>
-/* Maximum number of mount points/controllers */
-#define MAX_MNT_ELEMENTS 8
-/* Estimated number of groups created */
-#define MAX_GROUP_ELEMENTS 128
-
/*
* NOTE: Wide characters are not supported at the moment. Wide character support
* would require us to use a scanner/parser that can parse beyond ASCII
*/
-/* Definitions for the uid and gid members of a cgroup_rules */
-#define CGRULE_INVALID (-1)
-#define CGRULE_WILD (-2)
-
-#define CGRULE_SUCCESS_STORE_PID "SUCCESS_STORE_PID"
-
/* Flags for cgroup_change_cgroup_uid_gid() */
enum cgflags {
CGFLAG_USECACHE = 0x01,
@@ -126,15 +115,7 @@ struct cgroup_file_info {
short depth;
};
-#define CG_NV_MAX 100
-#define CG_CONTROLLER_MAX 100
-/* this is NOT ENOUGH for stat variables */
#define CG_VALUE_MAX 100
-/* Max number of mounted hierarchies. Event if one controller is mounted per
- * hier, it can not exceed CG_CONTROLLER_MAX
- */
-#define CG_HIER_MAX CG_CONTROLLER_MAX
-
struct cgroup_stat {
char name[FILENAME_MAX];
char value[CG_VALUE_MAX];
diff --git a/src/libcgroup-internal.h b/src/libcgroup-internal.h
index 8c5cc2f..55fa9fd 100644
--- a/src/libcgroup-internal.h
+++ b/src/libcgroup-internal.h
@@ -26,6 +26,25 @@ __BEGIN_DECLS
#include <sys/stat.h>
#include <sys/types.h>
+/* Maximum number of mount points/controllers */
+#define MAX_MNT_ELEMENTS 8
+/* Estimated number of groups created */
+#define MAX_GROUP_ELEMENTS 128
+
+#define CG_NV_MAX 100
+#define CG_CONTROLLER_MAX 100
+/* Max number of mounted hierarchies. Event if one controller is mounted per
+ * hier, it can not exceed CG_CONTROLLER_MAX
+ */
+#define CG_HIER_MAX CG_CONTROLLER_MAX
+
+/* Definitions for the uid and gid members of a cgroup_rules */
+#define CGRULE_INVALID (-1)
+#define CGRULE_WILD (-2)
+
+#define CGRULE_SUCCESS_STORE_PID "SUCCESS_STORE_PID"
+
+
#define CGRULES_CONF_FILE "/etc/cgrules.conf"
#define CGRULES_MAX_FIELDS_PER_LINE 3
diff --git a/src/tools/lssubsys.c b/src/tools/lssubsys.c
index cdb8284..ebb59b1 100644
--- a/src/tools/lssubsys.c
+++ b/src/tools/lssubsys.c
@@ -17,6 +17,7 @@
#include <getopt.h>
#include <libcgroup.h>
+#include <libcgroup-internal.h>
enum flag{
FL_MOUNT = 1, /* show the mount points */
diff --git a/src/tools/tools-common.h b/src/tools/tools-common.h
index 752eb57..b261dc3 100644
--- a/src/tools/tools-common.h
+++ b/src/tools/tools-common.h
@@ -20,6 +20,7 @@
#include "config.h"
#include <libcgroup.h>
+#include <libcgroup-internal.h>
#ifdef CGROUP_DEBUG
#define cgroup_dbg(x...) printf(x)