]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Remove unnecessary includes from libcgroup.h
authorJan Safranek <jsafrane@redhat.com>
Thu, 6 Aug 2009 12:03:26 +0000 (14:03 +0200)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Sat, 29 Aug 2009 05:20:25 +0000 (10:50 +0530)
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>
include/libcgroup.h
src/daemon/cgrulesengd.h
src/tools/cgcreate.c
src/tools/cgdelete.c
tests/libcgrouptest.h

index b8a3a77364bf854545f1a5517ffe1eb5f81fbd63..f4245626d90a75f71396b1deff1d8ed5790b85da 100644 (file)
 __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
index ddb1af0ce7672fe5d0c48bfd31deee8625107611..97c62f1148fff4e8458d40aad57c5e894345ebb3 100644 (file)
@@ -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
index 9920be396c89fe31c19e5097cecee251a7105ddb..78665e745f7bdeaa76348334f71d6134e2d84e19 100644 (file)
@@ -7,6 +7,7 @@
 #include <pwd.h>
 #include <sys/types.h>
 #include <errno.h>
+#include <unistd.h>
 
 #include "tools-common.h"
 
index 0a2c238d03d2a2ab12292658c88d3d18fa832cb5..51d89221159cbd9fb7aa5640a7e0c8bbaa45a404 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#include <unistd.h>
 
 #include "tools-common.h"
 
index 4ee9464ec6353f8a65c8eb68291e5a64660369cc..923828ac8eeafce8c11d11cea6b6f2eab924db76 100644 (file)
 #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 */