diff options
Diffstat (limited to 'include/libcgroup')
-rw-r--r-- | include/libcgroup/init.h | 2 | ||||
-rw-r--r-- | include/libcgroup/iterators.h | 8 | ||||
-rw-r--r-- | include/libcgroup/tasks.h | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/include/libcgroup/init.h b/include/libcgroup/init.h index b38eb61..d0e93b4 100644 --- a/include/libcgroup/init.h +++ b/include/libcgroup/init.h @@ -18,7 +18,7 @@ int cgroup_init(void); * @mount_point: The string where the mount point is stored. Please note, * the caller must free mount_point. */ -int cgroup_get_subsys_mount_point(char *controller, char **mount_point); +int cgroup_get_subsys_mount_point(const char *controller, char **mount_point); __END_DECLS diff --git a/include/libcgroup/iterators.h b/include/libcgroup/iterators.h index 3e9f9f7..e8df12a 100644 --- a/include/libcgroup/iterators.h +++ b/include/libcgroup/iterators.h @@ -74,7 +74,7 @@ struct controller_data { * @handle: Handle to be used during iteration * @info: info filled and returned about directory information */ -int cgroup_walk_tree_begin(char *controller, char *base_path, const int depth, +int cgroup_walk_tree_begin(const char *controller, const char *base_path, int depth, void **handle, struct cgroup_file_info *info, int *base_level); /** @@ -86,7 +86,7 @@ int cgroup_walk_tree_begin(char *controller, char *base_path, const int depth, * * Returns ECGEOF when we are done walking through the nodes. */ -int cgroup_walk_tree_next(const int depth, void **handle, +int cgroup_walk_tree_next(int depth, void **handle, struct cgroup_file_info *info, int base_level); int cgroup_walk_tree_end(void **handle); @@ -107,7 +107,7 @@ int cgroup_walk_tree_set_flags(void **handle, int flags); * @handle: Handle to be used during iteration. * @stat: Stats values will be filled and returned here. */ -int cgroup_read_stats_begin(char *controller, char *path, void **handle, +int cgroup_read_stats_begin(const char *controller, const char *path, void **handle, struct cgroup_stat *stat); /** @@ -126,7 +126,7 @@ int cgroup_read_stats_end(void **handle); * @handle: Handle to be used in the iteration * @pid: The pid read from the tasks file. Will be filled in by the API */ -int cgroup_get_task_begin(char *cgroup, char *controller, void **handle, +int cgroup_get_task_begin(const char *cgroup, const char *controller, void **handle, pid_t *pid); /** diff --git a/include/libcgroup/tasks.h b/include/libcgroup/tasks.h index 665f993..913251c 100644 --- a/include/libcgroup/tasks.h +++ b/include/libcgroup/tasks.h @@ -42,8 +42,8 @@ int cgroup_attach_task_pid(struct cgroup *cgroup, pid_t tid); * @return 0 on success, > 0 on error * TODO: Determine thread-safeness and fix of not safe. */ -int cgroup_change_cgroup_flags(const uid_t uid, const gid_t gid, - char *procname, const pid_t pid, const int flags); +int cgroup_change_cgroup_flags(uid_t uid, gid_t gid, + const char *procname, pid_t pid, int flags); /** * Changes the cgroup of a program based on the rules in the config file. If a @@ -62,8 +62,8 @@ int cgroup_change_cgroup_flags(const uid_t uid, const gid_t gid, * @return 0 on success, > 0 on error * TODO: Determine thread-safeness and fix if not safe. */ -int cgroup_change_cgroup_uid_gid_flags(const uid_t uid, const gid_t gid, - const pid_t pid, const int flags); +int cgroup_change_cgroup_uid_gid_flags(uid_t uid, gid_t gid, + pid_t pid, int flags); /** * Provides backwards-compatibility with older versions of the API. This @@ -84,7 +84,7 @@ int cgroup_change_cgroup_uid_gid(uid_t uid, gid_t gid, pid_t pid); * * returns 0 on success. */ -int cgroup_change_cgroup_path(char *path, pid_t pid, char *controllers[]); +int cgroup_change_cgroup_path(const char *path, pid_t pid, const char * const controllers[]); /** * Print the cached rules table. This function should be called only after |