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
7d4188ce
Unverified
Commit
7d4188ce
authored
May 13, 2019
by
Christian Brauner
Committed by
GitHub
May 13, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2998 from rikardfalkeborn/fix-returning-non-bool
Fix returning -1 in functions with return type bool
parents
fa9aa1fa
cdcaad48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
criu.c
src/lxc/criu.c
+0
-1
lvm.c
src/lxc/storage/lvm.c
+4
-4
zfs.c
src/lxc/storage/zfs.c
+1
-1
No files found.
src/lxc/criu.c
View file @
7d4188ce
...
...
@@ -1273,7 +1273,6 @@ static bool do_dump(struct lxc_container *c, char *mode, struct migrate_opts *op
if
(
!
cgroup_ops
)
{
ERROR
(
"failed to cgroup_init()"
);
_exit
(
EXIT_FAILURE
);
return
-
1
;
}
os
.
pipefd
=
criuout
[
1
];
...
...
src/lxc/storage/lvm.c
View file @
7d4188ce
...
...
@@ -535,13 +535,13 @@ bool lvm_create_clone(struct lxc_conf *conf, struct lxc_storage *orig,
if
(
!
newsize
&&
blk_getsize
(
orig
,
&
size
)
<
0
)
{
ERROR
(
"Failed to detect size of logical volume
\"
%s
\"
"
,
orig
->
src
);
return
-
1
;
return
false
;
}
/* detect filesystem */
if
(
detect_fs
(
orig
,
fstype
,
100
)
<
0
)
{
INFO
(
"Failed to detect filesystem type for
\"
%s
\"
"
,
orig
->
src
);
return
-
1
;
return
false
;
}
}
else
if
(
!
newsize
)
{
size
=
DEFAULT_FS_SIZE
;
...
...
@@ -553,7 +553,7 @@ bool lvm_create_clone(struct lxc_conf *conf, struct lxc_storage *orig,
ret
=
do_lvm_create
(
src
,
size
,
thinpool
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to create lvm storage volume
\"
%s
\"
"
,
src
);
return
-
1
;
return
false
;
}
cmd_args
[
0
]
=
fstype
;
...
...
@@ -563,7 +563,7 @@ bool lvm_create_clone(struct lxc_conf *conf, struct lxc_storage *orig,
if
(
ret
<
0
)
{
ERROR
(
"Failed to create new filesystem
\"
%s
\"
for lvm storage "
"volume
\"
%s
\"
: %s"
,
fstype
,
src
,
cmd_output
);
return
-
1
;
return
false
;
}
data
.
orig
=
orig
;
...
...
src/lxc/storage/zfs.c
View file @
7d4188ce
...
...
@@ -427,7 +427,7 @@ bool zfs_snapshot(struct lxc_conf *conf, struct lxc_storage *orig,
if
(
ret
<
0
||
ret
>=
PATH_MAX
)
{
ERROR
(
"Failed to create string"
);
free
(
snapshot
);
return
-
1
;
return
false
;
}
cmd_args
.
dataset
=
lxc_storage_get_path
(
new
->
src
,
new
->
type
);
...
...
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