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
434f12c1
Unverified
Commit
434f12c1
authored
Dec 08, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: clean up hooks
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
2b9319af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
confile.c
src/lxc/confile.c
+5
-9
No files found.
src/lxc/confile.c
View file @
434f12c1
...
...
@@ -1105,10 +1105,8 @@ static int set_config_hooks(const char *key, const char *value,
if
(
lxc_config_value_empty
(
value
))
return
lxc_clear_hooks
(
lxc_conf
,
key
);
if
(
strcmp
(
key
+
4
,
"hook"
)
==
0
)
{
ERROR
(
"lxc.hook must not have a value"
);
return
-
1
;
}
if
(
strcmp
(
key
+
4
,
"hook"
)
==
0
)
return
log_error_errno
(
-
EINVAL
,
EINVAL
,
"lxc.hook must not have a value"
);
copy
=
strdup
(
value
);
if
(
!
copy
)
...
...
@@ -1151,11 +1149,9 @@ static int set_config_hooks_version(const char *key, const char *value,
if
(
ret
<
0
)
return
-
1
;
if
(
tmp
>
1
)
{
ERROR
(
"Invalid hook version specified. Currently only 0 "
"(legacy) and 1 are supported"
);
return
-
1
;
}
if
(
tmp
>
1
)
return
log_error_errno
(
-
EINVAL
,
EINVAL
,
"Invalid hook version specified. Currently only 0 (legacy) and 1 are supported"
);
lxc_conf
->
hooks_version
=
tmp
;
...
...
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