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
e3a953a6
Unverified
Commit
e3a953a6
authored
Feb 20, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: tweak lxc.cgroup.use handling in __cgroup_init()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
42d19341
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
cgfsng.c
src/lxc/cgroups/cgfsng.c
+9
-10
No files found.
src/lxc/cgroups/cgfsng.c
View file @
e3a953a6
...
@@ -3491,7 +3491,7 @@ static int __cgroup_init(struct cgroup_ops *ops, struct lxc_conf *conf)
...
@@ -3491,7 +3491,7 @@ static int __cgroup_init(struct cgroup_ops *ops, struct lxc_conf *conf)
{
{
__do_close
int
dfd
=
-
EBADF
;
__do_close
int
dfd
=
-
EBADF
;
int
ret
;
int
ret
;
const
char
*
tmp
;
const
char
*
controllers_use
;
if
(
ops
->
dfd_mnt_cgroupfs_host
>=
0
)
if
(
ops
->
dfd_mnt_cgroupfs_host
>=
0
)
return
ret_errno
(
EINVAL
);
return
ret_errno
(
EINVAL
);
...
@@ -3506,18 +3506,17 @@ static int __cgroup_init(struct cgroup_ops *ops, struct lxc_conf *conf)
...
@@ -3506,18 +3506,17 @@ static int __cgroup_init(struct cgroup_ops *ops, struct lxc_conf *conf)
if
(
dfd
<
0
)
if
(
dfd
<
0
)
return
syserrno
(
-
errno
,
"Failed to open "
DEFAULT_CGROUP_MOUNTPOINT
);
return
syserrno
(
-
errno
,
"Failed to open "
DEFAULT_CGROUP_MOUNTPOINT
);
tmp
=
lxc_global_config_value
(
"lxc.cgroup.use"
);
controllers_use
=
lxc_global_config_value
(
"lxc.cgroup.use"
);
if
(
tmp
)
{
if
(
controllers_use
)
{
__do_free
char
*
pin
=
NULL
;
__do_free
char
*
dup
=
NULL
;
char
*
chop
,
*
cur
;
char
*
it
;
pin
=
strdup
(
tmp
);
dup
=
strdup
(
controllers_use
);
if
(
!
pin
)
if
(
!
dup
)
return
-
errno
;
return
-
errno
;
chop
=
pin
;
lxc_iterate_parts
(
cur
,
cho
p
,
","
)
lxc_iterate_parts
(
it
,
du
p
,
","
)
must_append_string
(
&
ops
->
cgroup_use
,
cur
);
must_append_string
(
&
ops
->
cgroup_use
,
it
);
}
}
/*
/*
...
...
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