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
70baef7c
Commit
70baef7c
authored
Oct 18, 2016
by
Serge Hallyn
Committed by
GitHub
Oct 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1234 from brauner/2016-10-14/better_errors_for_lxc_start
tools: better error reporting for lxc-start
parents
1dc94b4a
040f39c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
lxc_start.c
src/lxc/tools/lxc_start.c
+18
-2
No files found.
src/lxc/tools/lxc_start.c
View file @
70baef7c
...
...
@@ -86,7 +86,7 @@ static int ensure_path(char **confpath, const char *path)
goto
err
;
}
}
err
=
0
;
err
=
EXIT_SUCCESS
;
err:
free
(
fullpath
);
...
...
@@ -231,6 +231,12 @@ int main(int argc, char *argv[])
exit
(
err
);
lxc_log_options_no_override
();
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RDWR
)
<
0
)
{
if
(
!
my_args
.
quiet
)
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
exit
(
err
);
}
const
char
*
lxcpath
=
my_args
.
lxcpath
[
0
];
/*
...
...
@@ -275,9 +281,19 @@ int main(int argc, char *argv[])
}
}
if
(
!
c
->
is_defined
(
c
))
{
fprintf
(
stderr
,
"Error: container %s is not defined
\n
"
,
c
->
name
);
goto
out
;
}
if
(
!
c
->
may_control
(
c
))
{
fprintf
(
stderr
,
"Insufficent privileges to control %s
\n
"
,
c
->
name
);
goto
out
;
}
if
(
c
->
is_running
(
c
))
{
ERROR
(
"Container is already running."
);
err
=
0
;
err
=
EXIT_SUCCESS
;
goto
out
;
}
/*
...
...
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