From 305fdb705e4eca50f3dc18d7cc685b547ce0ee98 Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Fri, 26 Jun 2009 23:06:18 +0530 Subject: libcgroup: Introduce an API to get the mount point of a specific subsystem Introduce an API which will query the mount table and return the mount point of a specific subsystem. This is needed in the case when the user knows which subsystem he wants the details of, which would make the use of the get_controller* APIs cumbersome. Signed-off-by: Dhaval Giani --- include/libcgroup.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/libcgroup.h b/include/libcgroup.h index ce0d8a5..9bc74d6 100644 --- a/include/libcgroup.h +++ b/include/libcgroup.h @@ -324,6 +324,15 @@ int cgroup_get_controller_begin(void **handle, struct cgroup_mount_point *info); */ int cgroup_get_controller_next(void **handle, struct cgroup_mount_point *info); int cgroup_get_controller_end(void **handle); + +/* + * Reads the mount to table to give the mount point of a controller + * @controller: Name of the controller + * @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); + /* The wrappers for filling libcg structures */ struct cgroup *cgroup_new_cgroup(const char *name); -- cgit