summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2009-08-06 14:03:26 +0200
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-08-29 10:50:25 +0530
commit6f93cd767947d29c51a8d9fefeb7e582b0a324a2 (patch)
tree241ed98fedb909f8a5a56c2c833516c233cd93d5
parent76b46b3e37dc3417e63654e262067e995c509bb4 (diff)
downloadlibcg-6f93cd767947d29c51a8d9fefeb7e582b0a324a2.tar.gz
libcg-6f93cd767947d29c51a8d9fefeb7e582b0a324a2.tar.xz
libcg-6f93cd767947d29c51a8d9fefeb7e582b0a324a2.zip
Remove unnecessary includes from libcgroup.h
libcgroup.h includes some header files, which are not then used. These should be removed, resp. moved to the source files where they are actually needed. Signed-off-by: Jan Safranek <jsafrane@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
-rw-r--r--include/libcgroup.h4
-rw-r--r--src/daemon/cgrulesengd.h1
-rw-r--r--src/tools/cgcreate.c1
-rw-r--r--src/tools/cgdelete.c1
-rw-r--r--tests/libcgrouptest.h3
5 files changed, 5 insertions, 5 deletions
diff --git a/include/libcgroup.h b/include/libcgroup.h
index b8a3a77..f424562 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -21,13 +21,9 @@
__BEGIN_DECLS
#include <grp.h>
-#include <linux/types.h>
#include <stdbool.h>
#include <stdio.h>
-#include <sys/stat.h>
#include <sys/types.h>
-#include <unistd.h>
-#include <limits.h>
#include <linux/cn_proc.h>
#ifndef _GNU_SOURCE
diff --git a/src/daemon/cgrulesengd.h b/src/daemon/cgrulesengd.h
index ddb1af0..97c62f1 100644
--- a/src/daemon/cgrulesengd.h
+++ b/src/daemon/cgrulesengd.h
@@ -22,6 +22,7 @@ __BEGIN_DECLS
#include "config.h"
#include "libcgroup.h"
#include <linux/connector.h>
+#include <linux/cn_proc.h>
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
diff --git a/src/tools/cgcreate.c b/src/tools/cgcreate.c
index 9920be3..78665e7 100644
--- a/src/tools/cgcreate.c
+++ b/src/tools/cgcreate.c
@@ -7,6 +7,7 @@
#include <pwd.h>
#include <sys/types.h>
#include <errno.h>
+#include <unistd.h>
#include "tools-common.h"
diff --git a/src/tools/cgdelete.c b/src/tools/cgdelete.c
index 0a2c238..51d8922 100644
--- a/src/tools/cgdelete.c
+++ b/src/tools/cgdelete.c
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <unistd.h>
#include "tools-common.h"
diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h
index 4ee9464..923828a 100644
--- a/tests/libcgrouptest.h
+++ b/tests/libcgrouptest.h
@@ -26,9 +26,10 @@
#include <string.h>
#include <sys/syscall.h>
#include <sys/types.h>
-
+#include <sys/stat.h>
#include <libcgroup.h>
#include "../config.h"
+#include <unistd.h>
#define SIZE 100 /* Max size of a message to be printed */
#define NUM_MSGS 20 /* Number of such messsages */