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
68f4f387
Unverified
Commit
68f4f387
authored
Mar 04, 2019
by
tomponline
Committed by
Christian Brauner
Apr 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: shut up gcc and remove unused variables.
Closes #2885. Signed-off-by:
tomponline
<
tomp@tomp.uk
>
parent
5ec0ffa9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
6 deletions
+5
-6
loop.c
src/lxc/storage/loop.c
+1
-1
lvm.c
src/lxc/storage/lvm.c
+2
-2
nbd.c
src/lxc/storage/nbd.c
+1
-1
storage.c
src/lxc/storage/storage.c
+1
-2
No files found.
src/lxc/storage/loop.c
View file @
68f4f387
...
@@ -137,7 +137,7 @@ int loop_clonepaths(struct lxc_storage *orig, struct lxc_storage *new,
...
@@ -137,7 +137,7 @@ int loop_clonepaths(struct lxc_storage *orig, struct lxc_storage *new,
int
loop_create
(
struct
lxc_storage
*
bdev
,
const
char
*
dest
,
const
char
*
n
,
int
loop_create
(
struct
lxc_storage
*
bdev
,
const
char
*
dest
,
const
char
*
n
,
struct
bdev_specs
*
specs
)
struct
bdev_specs
*
specs
)
{
{
__do_free
char
*
srcdev
;
__do_free
char
*
srcdev
=
NULL
;
const
char
*
fstype
;
const
char
*
fstype
;
uint64_t
sz
;
uint64_t
sz
;
int
ret
,
len
;
int
ret
,
len
;
...
...
src/lxc/storage/lvm.c
View file @
68f4f387
...
@@ -114,7 +114,7 @@ static int do_lvm_create(const char *path, uint64_t size, const char *thinpool)
...
@@ -114,7 +114,7 @@ static int do_lvm_create(const char *path, uint64_t size, const char *thinpool)
char
*
pathdup
,
*
vg
,
*
lv
;
char
*
pathdup
,
*
vg
,
*
lv
;
char
cmd_output
[
PATH_MAX
];
char
cmd_output
[
PATH_MAX
];
char
sz
[
24
];
char
sz
[
24
];
__do_free
char
*
tp
;
__do_free
char
*
tp
=
NULL
;
struct
lvcreate_args
cmd_args
=
{
0
};
struct
lvcreate_args
cmd_args
=
{
0
};
ret
=
snprintf
(
sz
,
24
,
"%"
PRIu64
"b"
,
size
);
ret
=
snprintf
(
sz
,
24
,
"%"
PRIu64
"b"
,
size
);
...
@@ -268,7 +268,7 @@ int lvm_umount(struct lxc_storage *bdev)
...
@@ -268,7 +268,7 @@ int lvm_umount(struct lxc_storage *bdev)
#define __LVSCMD "lvs --unbuffered --noheadings -o lv_attr %s 2>/dev/null"
#define __LVSCMD "lvs --unbuffered --noheadings -o lv_attr %s 2>/dev/null"
int
lvm_compare_lv_attr
(
const
char
*
path
,
int
pos
,
const
char
expected
)
int
lvm_compare_lv_attr
(
const
char
*
path
,
int
pos
,
const
char
expected
)
{
{
__do_free
char
*
cmd
;
__do_free
char
*
cmd
=
NULL
;
struct
lxc_popen_FILE
*
f
;
struct
lxc_popen_FILE
*
f
;
int
ret
,
status
;
int
ret
,
status
;
size_t
len
;
size_t
len
;
...
...
src/lxc/storage/nbd.c
View file @
68f4f387
...
@@ -62,7 +62,7 @@ static bool wait_for_partition(const char *path);
...
@@ -62,7 +62,7 @@ static bool wait_for_partition(const char *path);
bool
attach_nbd
(
char
*
src
,
struct
lxc_conf
*
conf
)
bool
attach_nbd
(
char
*
src
,
struct
lxc_conf
*
conf
)
{
{
__do_free
char
*
orig
;
__do_free
char
*
orig
=
NULL
;
char
*
p
,
path
[
50
];
char
*
p
,
path
[
50
];
int
i
=
0
;
int
i
=
0
;
...
...
src/lxc/storage/storage.c
View file @
68f4f387
...
@@ -568,9 +568,8 @@ struct lxc_storage *storage_create(const char *dest, const char *type,
...
@@ -568,9 +568,8 @@ struct lxc_storage *storage_create(const char *dest, const char *type,
/* -B lvm,dir */
/* -B lvm,dir */
if
(
strchr
(
type
,
','
))
{
if
(
strchr
(
type
,
','
))
{
__do_free
char
*
dup
;
__do_free
char
*
dup
=
NULL
;
char
*
token
;
char
*
token
;
size_t
len
;
dup
=
must_copy_string
(
type
);
dup
=
must_copy_string
(
type
);
lxc_iterate_parts
(
token
,
dup
,
","
)
{
lxc_iterate_parts
(
token
,
dup
,
","
)
{
...
...
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