Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
d6337a5f
Unverified
Commit
d6337a5f
authored
Jan 31, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: get controllers on the unified hierarchy
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
2ddc6653
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
cgfsng.c
src/lxc/cgroups/cgfsng.c
+0
-0
cgroup.h
src/lxc/cgroups/cgroup.h
+7
-0
cgroup_utils.c
src/lxc/cgroups/cgroup_utils.c
+3
-3
cgroup_utils.h
src/lxc/cgroups/cgroup_utils.h
+0
-4
No files found.
src/lxc/cgroups/cgfsng.c
View file @
d6337a5f
This diff is collapsed.
Click to expand it.
src/lxc/cgroups/cgroup.h
View file @
d6337a5f
...
...
@@ -33,6 +33,13 @@ struct lxc_conf;
struct
lxc_list
;
typedef
enum
{
CGROUP_LAYOUT_UNKNOWN
=
-
1
,
CGROUP_LAYOUT_LEGACY
=
0
,
CGROUP_LAYOUT_HYBRID
=
1
,
CGROUP_LAYOUT_UNIFIED
=
2
,
}
cgroup_layout_t
;
typedef
enum
{
CGFS
,
CGMANAGER
,
CGFSNG
,
...
...
src/lxc/cgroups/cgroup_utils.c
View file @
d6337a5f
...
...
@@ -35,12 +35,12 @@
int
get_cgroup_version
(
char
*
line
)
{
if
(
is_cgroupfs_v1
(
line
))
return
CGROUP_
V1
;
return
CGROUP_
SUPER_MAGIC
;
if
(
is_cgroupfs_v2
(
line
))
return
CGROUP
_V2
;
return
CGROUP
2_SUPER_MAGIC
;
return
-
1
;
return
0
;
}
bool
is_cgroupfs_v1
(
char
*
line
)
...
...
src/lxc/cgroups/cgroup_utils.h
View file @
d6337a5f
...
...
@@ -28,10 +28,6 @@
#include <stdbool.h>
#include <stdio.h>
#define CGROUP_V1 0
#define CGROUP_V2 1
#define LXCFS_CGROUP 2
/* Retrieve the cgroup version of a given entry from /proc/<pid>/mountinfo. */
extern
int
get_cgroup_version
(
char
*
line
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment