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
1d0ef851
Unverified
Commit
1d0ef851
authored
Dec 08, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups/cgfsng: rework cgfsng_get_hierarchies()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
9a8bead2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
cgfsng.c
src/lxc/cgroups/cgfsng.c
+6
-3
No files found.
src/lxc/cgroups/cgfsng.c
View file @
1d0ef851
...
@@ -1978,24 +1978,27 @@ __cgfsng_ops static int cgfsng_num_hierarchies(struct cgroup_ops *ops)
...
@@ -1978,24 +1978,27 @@ __cgfsng_ops static int cgfsng_num_hierarchies(struct cgroup_ops *ops)
return
i
;
return
i
;
}
}
__cgfsng_ops
static
bool
cgfsng_get_hierarchies
(
struct
cgroup_ops
*
ops
,
int
n
,
char
***
out
)
__cgfsng_ops
static
bool
cgfsng_get_hierarchies
(
struct
cgroup_ops
*
ops
,
int
n
,
char
***
out
)
{
{
int
i
;
int
i
;
if
(
!
ops
)
return
ret_set_errno
(
false
,
ENOENT
);
if
(
!
ops
->
hierarchies
)
if
(
!
ops
->
hierarchies
)
return
false
;
return
false
;
/* sanity check n */
/* sanity check n */
for
(
i
=
0
;
i
<
n
;
i
++
)
for
(
i
=
0
;
i
<
n
;
i
++
)
if
(
!
ops
->
hierarchies
[
i
])
if
(
!
ops
->
hierarchies
[
i
])
return
false
;
return
ret_set_errno
(
false
,
ENOENT
)
;
*
out
=
ops
->
hierarchies
[
i
]
->
controllers
;
*
out
=
ops
->
hierarchies
[
i
]
->
controllers
;
return
true
;
return
true
;
}
}
static
bool
cg_legacy_freeze
(
struct
cgroup_ops
*
ops
)
static
bool
cg_legacy_freeze
(
struct
cgroup_ops
*
ops
)
{
{
__do_free
char
*
path
=
NULL
;
__do_free
char
*
path
=
NULL
;
...
...
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