diff options
author | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-06-18 19:42:45 +0530 |
---|---|---|
committer | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-06-18 19:49:39 +0530 |
commit | a32b08930f1828b39d6cafd2779bdab66aebc484 (patch) | |
tree | ad0be225f4af0e0c7369021810f1541487709e81 /src/libcgroup-internal.h | |
parent | 89874676e7a84e504e3b2829228c7c3863a6d500 (diff) | |
download | libcg-a32b08930f1828b39d6cafd2779bdab66aebc484.tar.gz libcg-a32b08930f1828b39d6cafd2779bdab66aebc484.tar.xz libcg-a32b08930f1828b39d6cafd2779bdab66aebc484.zip |
libcgroup: Add flags to the walk_tree handle
Introduce a cgroup_tree_handle structure so that we can track flags for
the walk_tree operation. In a number of cases we would prefer to walk the
tree in postorder as opposed to pre-order which is the current default.
This patch does the addition.
Changes since V1:
1. Added checks for !handle as suggested by Bharata
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Diffstat (limited to 'src/libcgroup-internal.h')
-rw-r--r-- | src/libcgroup-internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libcgroup-internal.h b/src/libcgroup-internal.h index 705ac88..95ff76c 100644 --- a/src/libcgroup-internal.h +++ b/src/libcgroup-internal.h @@ -19,8 +19,11 @@ __BEGIN_DECLS #include "config.h" +#include <fts.h> #include <libcgroup.h> #include <limits.h> +#include <sys/stat.h> +#include <sys/types.h> #define CGRULES_CONF_FILE "/etc/cgrules.conf" #define CGRULES_MAX_FIELDS_PER_LINE 3 @@ -87,6 +90,12 @@ struct cgroup_rule_list { int len; }; +/*The walk_tree handle */ +struct cgroup_tree_handle { + FTS *fts; + int flags; +}; + /* Internal API */ char *cg_build_path(char *name, char *path, char *type); |