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
d7c8c138
Unverified
Commit
d7c8c138
authored
Feb 20, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: s/basecginfo/cgroup_info/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
522bbc79
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
cgfsng.c
src/lxc/cgroups/cgfsng.c
+7
-7
No files found.
src/lxc/cgroups/cgfsng.c
View file @
d7c8c138
...
@@ -3311,7 +3311,7 @@ static void cg_unified_delegate(char ***delegate)
...
@@ -3311,7 +3311,7 @@ static void cg_unified_delegate(char ***delegate)
*/
*/
static
int
cg_hybrid_init
(
struct
cgroup_ops
*
ops
,
bool
relative
,
bool
unprivileged
)
static
int
cg_hybrid_init
(
struct
cgroup_ops
*
ops
,
bool
relative
,
bool
unprivileged
)
{
{
__do_free
char
*
basecg
info
=
NULL
,
*
line
=
NULL
;
__do_free
char
*
cgroup_
info
=
NULL
,
*
line
=
NULL
;
__do_free_string_list
char
**
klist
=
NULL
,
**
nlist
=
NULL
;
__do_free_string_list
char
**
klist
=
NULL
,
**
nlist
=
NULL
;
__do_fclose
FILE
*
f
=
NULL
;
__do_fclose
FILE
*
f
=
NULL
;
int
ret
;
int
ret
;
...
@@ -3321,10 +3321,10 @@ static int cg_hybrid_init(struct cgroup_ops *ops, bool relative, bool unprivileg
...
@@ -3321,10 +3321,10 @@ static int cg_hybrid_init(struct cgroup_ops *ops, bool relative, bool unprivileg
* cgroups as our base in that case.
* cgroups as our base in that case.
*/
*/
if
(
!
relative
&&
(
geteuid
()
==
0
))
if
(
!
relative
&&
(
geteuid
()
==
0
))
basecg
info
=
read_file_at
(
-
EBADF
,
"/proc/1/cgroup"
,
PROTECT_OPEN
,
0
);
cgroup_
info
=
read_file_at
(
-
EBADF
,
"/proc/1/cgroup"
,
PROTECT_OPEN
,
0
);
else
else
basecg
info
=
read_file_at
(
-
EBADF
,
"/proc/self/cgroup"
,
PROTECT_OPEN
,
0
);
cgroup_
info
=
read_file_at
(
-
EBADF
,
"/proc/self/cgroup"
,
PROTECT_OPEN
,
0
);
if
(
!
basecg
info
)
if
(
!
cgroup_
info
)
return
ret_errno
(
ENOMEM
);
return
ret_errno
(
ENOMEM
);
ret
=
get_existing_subsystems
(
&
klist
,
&
nlist
);
ret
=
get_existing_subsystems
(
&
klist
,
&
nlist
);
...
@@ -3335,7 +3335,7 @@ static int cg_hybrid_init(struct cgroup_ops *ops, bool relative, bool unprivileg
...
@@ -3335,7 +3335,7 @@ static int cg_hybrid_init(struct cgroup_ops *ops, bool relative, bool unprivileg
if
(
!
f
)
if
(
!
f
)
return
log_error_errno
(
-
1
,
errno
,
"Failed to open
\"
/proc/self/mountinfo
\"
"
);
return
log_error_errno
(
-
1
,
errno
,
"Failed to open
\"
/proc/self/mountinfo
\"
"
);
lxc_cgfsng_print_basecg_debuginfo
(
basecg
info
,
klist
,
nlist
);
lxc_cgfsng_print_basecg_debuginfo
(
cgroup_
info
,
klist
,
nlist
);
while
(
getline
(
&
line
,
&
len
,
f
)
!=
-
1
)
{
while
(
getline
(
&
line
,
&
len
,
f
)
!=
-
1
)
{
__do_free
char
*
base_cgroup
=
NULL
,
*
mountpoint
=
NULL
;
__do_free
char
*
base_cgroup
=
NULL
,
*
mountpoint
=
NULL
;
...
@@ -3380,9 +3380,9 @@ static int cg_hybrid_init(struct cgroup_ops *ops, bool relative, bool unprivileg
...
@@ -3380,9 +3380,9 @@ static int cg_hybrid_init(struct cgroup_ops *ops, bool relative, bool unprivileg
}
}
if
(
type
==
CGROUP_SUPER_MAGIC
)
if
(
type
==
CGROUP_SUPER_MAGIC
)
base_cgroup
=
cg_hybrid_get_current_cgroup
(
relative
,
basecg
info
,
controller_list
[
0
],
CGROUP_SUPER_MAGIC
);
base_cgroup
=
cg_hybrid_get_current_cgroup
(
relative
,
cgroup_
info
,
controller_list
[
0
],
CGROUP_SUPER_MAGIC
);
else
else
base_cgroup
=
cg_hybrid_get_current_cgroup
(
relative
,
basecg
info
,
NULL
,
CGROUP2_SUPER_MAGIC
);
base_cgroup
=
cg_hybrid_get_current_cgroup
(
relative
,
cgroup_
info
,
NULL
,
CGROUP2_SUPER_MAGIC
);
if
(
!
base_cgroup
)
{
if
(
!
base_cgroup
)
{
WARN
(
"Failed to find current cgroup"
);
WARN
(
"Failed to find current cgroup"
);
continue
;
continue
;
...
...
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