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
66b66624
Unverified
Commit
66b66624
authored
Jul 27, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: workaround gcc-7 bug
Also: LOL Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
d9f78406
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
cgfsng.c
src/lxc/cgroups/cgfsng.c
+14
-3
No files found.
src/lxc/cgroups/cgfsng.c
View file @
66b66624
...
@@ -1315,7 +1315,8 @@ static inline bool cgfsng_create(void *hdata)
...
@@ -1315,7 +1315,8 @@ static inline bool cgfsng_create(void *hdata)
{
{
struct
cgfsng_handler_data
*
d
=
hdata
;
struct
cgfsng_handler_data
*
d
=
hdata
;
char
*
tmp
,
*
cgname
,
*
offset
;
char
*
tmp
,
*
cgname
,
*
offset
;
int
i
,
idx
=
0
;
int
i
,
ret
;
int
idx
=
0
;
size_t
len
;
size_t
len
;
if
(
!
d
)
if
(
!
d
)
...
@@ -1341,8 +1342,18 @@ again:
...
@@ -1341,8 +1342,18 @@ again:
ERROR
(
"Too many conflicting cgroup names"
);
ERROR
(
"Too many conflicting cgroup names"
);
goto
out_free
;
goto
out_free
;
}
}
if
(
idx
)
if
(
idx
)
{
snprintf
(
offset
,
5
,
"-%d"
,
idx
);
ret
=
snprintf
(
offset
,
5
,
"-%d"
,
idx
);
if
(
ret
<
0
||
(
size_t
)
ret
>=
5
)
{
FILE
*
f
=
fopen
(
"/dev/null"
,
"w"
);
if
(
f
>=
0
)
{
fprintf
(
f
,
"Workaround for GCC7 bug: "
"https://gcc.gnu.org/bugzilla/"
"show_bug.cgi?id=78969"
);
fclose
(
f
);
}
}
}
for
(
i
=
0
;
hierarchies
[
i
];
i
++
)
{
for
(
i
=
0
;
hierarchies
[
i
];
i
++
)
{
if
(
!
create_path_for_hierarchy
(
hierarchies
[
i
],
cgname
))
{
if
(
!
create_path_for_hierarchy
(
hierarchies
[
i
],
cgname
))
{
int
j
;
int
j
;
...
...
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