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
a29cc280
Unverified
Commit
a29cc280
authored
Feb 02, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxccontainer: use cgroup_get()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
b1356424
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
lxccontainer.c
src/lxc/lxccontainer.c
+11
-5
No files found.
src/lxc/lxccontainer.c
View file @
a29cc280
...
...
@@ -3296,6 +3296,8 @@ WRAP_API_2(bool, lxcapi_set_cgroup_item, const char *, const char *)
static
int
do_lxcapi_get_cgroup_item
(
struct
lxc_container
*
c
,
const
char
*
subsys
,
char
*
retv
,
int
inlen
)
{
int
ret
;
call_cleaner
(
cgroup_exit
)
struct
cgroup_ops
*
cgroup_ops
=
NULL
;
if
(
!
c
)
...
...
@@ -3304,12 +3306,16 @@ static int do_lxcapi_get_cgroup_item(struct lxc_container *c, const char *subsys
if
(
is_stopped
(
c
))
return
-
1
;
cgroup_ops
=
cgroup_init
(
c
->
lxc_conf
);
if
(
!
cgroup_ops
)
return
-
1
;
ret
=
cgroup_get
(
c
->
lxc_conf
,
subsys
,
retv
,
inlen
,
c
->
name
,
c
->
config_path
);
if
(
ret
==
ENOCGROUP2
)
{
cgroup_ops
=
cgroup_init
(
c
->
lxc_conf
);
if
(
!
cgroup_ops
)
return
-
1
;
return
cgroup_ops
->
get
(
cgroup_ops
,
subsys
,
retv
,
inlen
,
c
->
name
,
c
->
config_path
);
}
return
cgroup_ops
->
get
(
cgroup_ops
,
subsys
,
retv
,
inlen
,
c
->
name
,
c
->
config_path
);
return
ret
;
}
WRAP_API_3
(
int
,
lxcapi_get_cgroup_item
,
const
char
*
,
char
*
,
int
)
...
...
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