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
4639029c
Unverified
Commit
4639029c
authored
Feb 02, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freezer: make methods return bool
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
c8af3332
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
freezer.c
src/lxc/freezer.c
+4
-4
lxc.h
src/lxc/lxc.h
+2
-2
No files found.
src/lxc/freezer.c
View file @
4639029c
...
...
@@ -68,7 +68,7 @@ static int do_freeze_thaw(bool freeze, struct lxc_conf *conf, const char *name,
return
0
;
}
int
lxc_freeze
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
)
bool
lxc_freeze
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
)
{
int
ret
;
...
...
@@ -78,10 +78,10 @@ int lxc_freeze(struct lxc_conf *conf, const char *name, const char *lxcpath)
else
ret
=
do_freeze_thaw
(
true
,
conf
,
name
,
lxcpath
);
lxc_cmd_notify_state_listeners
(
name
,
lxcpath
,
!
ret
?
FROZEN
:
RUNNING
);
return
ret
;
return
ret
==
0
;
}
int
lxc_unfreeze
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
)
bool
lxc_unfreeze
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
)
{
int
ret
;
...
...
@@ -91,5 +91,5 @@ int lxc_unfreeze(struct lxc_conf *conf, const char *name, const char *lxcpath)
else
ret
=
do_freeze_thaw
(
false
,
conf
,
name
,
lxcpath
);
lxc_cmd_notify_state_listeners
(
name
,
lxcpath
,
!
ret
?
RUNNING
:
FROZEN
);
return
ret
;
return
ret
==
0
;
}
src/lxc/lxc.h
View file @
4639029c
...
...
@@ -62,14 +62,14 @@ __hidden extern int lxc_monitor_close(int fd);
* @name : the container name
* Returns 0 on success, < 0 otherwise
*/
__hidden
extern
int
lxc_freeze
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
);
__hidden
extern
bool
lxc_freeze
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
);
/*
* Unfreeze all previously frozen tasks.
* @name : the name of the container
* Return 0 on success, < 0 otherwise
*/
__hidden
extern
int
lxc_unfreeze
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
);
__hidden
extern
bool
lxc_unfreeze
(
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
);
/*
* Retrieve the container state
...
...
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