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
e836f50a
Unverified
Commit
e836f50a
authored
Feb 18, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start: print_top_failing_dir()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
05ee16e7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
start.c
src/lxc/start.c
+12
-5
No files found.
src/lxc/start.c
View file @
e836f50a
...
@@ -92,23 +92,30 @@ static void lxc_destroy_container_on_signal(struct lxc_handler *handler,
...
@@ -92,23 +92,30 @@ static void lxc_destroy_container_on_signal(struct lxc_handler *handler,
static
void
print_top_failing_dir
(
const
char
*
path
)
static
void
print_top_failing_dir
(
const
char
*
path
)
{
{
size_t
len
=
strlen
(
path
)
;
int
ret
;
char
*
copy
=
alloca
(
len
+
1
),
*
p
,
*
e
,
saved
;
size_t
len
;
strcpy
(
copy
,
path
)
;
char
*
copy
,
*
e
,
*
p
,
saved
;
len
=
strlen
(
path
);
copy
=
alloca
(
len
+
1
);
strcpy
(
copy
,
path
);
p
=
copy
;
p
=
copy
;
e
=
copy
+
len
;
e
=
copy
+
len
;
while
(
p
<
e
)
{
while
(
p
<
e
)
{
while
(
p
<
e
&&
*
p
==
'/'
)
while
(
p
<
e
&&
*
p
==
'/'
)
p
++
;
p
++
;
while
(
p
<
e
&&
*
p
!=
'/'
)
while
(
p
<
e
&&
*
p
!=
'/'
)
p
++
;
p
++
;
saved
=
*
p
;
saved
=
*
p
;
*
p
=
'\0'
;
*
p
=
'\0'
;
if
(
access
(
copy
,
X_OK
))
{
ret
=
access
(
copy
,
X_OK
);
if
(
ret
!=
0
)
{
SYSERROR
(
"Could not access %s. Please grant it x "
SYSERROR
(
"Could not access %s. Please grant it x "
"access, or add an ACL for the container "
"access, or add an ACL for the container "
"root
.
"
,
copy
);
"root"
,
copy
);
return
;
return
;
}
}
*
p
=
saved
;
*
p
=
saved
;
...
...
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