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
bbb97736
Unverified
Commit
bbb97736
authored
Jun 15, 2018
by
Serge Hallyn
Committed by
GitHub
Jun 15, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2409 from brauner/2018-06-15/coverity
coverity
parents
1c605abd
64b0e15a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
conf.c
src/lxc/conf.c
+4
-9
lxccontainer.c
src/lxc/lxccontainer.c
+4
-1
lxc_info.c
src/lxc/tools/lxc_info.c
+2
-0
lxc_ls.c
src/lxc/tools/lxc_ls.c
+1
-1
No files found.
src/lxc/conf.c
View file @
bbb97736
...
...
@@ -1541,16 +1541,11 @@ static int lxc_setup_devpts(struct lxc_conf *conf)
if
(
ret
<
0
||
(
size_t
)
ret
>=
sizeof
(
devpts_mntopts
))
return
-
1
;
/* Unmount old devpts instance. */
ret
=
access
(
"/dev/pts/ptmx"
,
F_OK
);
if
(
!
ret
)
{
ret
=
umount
(
"/dev/pts"
);
if
(
ret
<
0
)
{
SYSERROR
(
"Failed to unmount old devpts instance"
);
return
-
1
;
}
ret
=
umount2
(
"/dev/pts"
,
MNT_DETACH
);
if
(
ret
<
0
)
WARN
(
"%s - Failed to unmount old devpts instance"
,
strerror
(
errno
));
else
DEBUG
(
"Unmounted old devpts instance"
);
}
/* Create mountpoint for devpts instance. */
ret
=
mkdir
(
"/dev/pts"
,
0755
);
...
...
src/lxc/lxccontainer.c
View file @
bbb97736
...
...
@@ -2625,7 +2625,10 @@ static bool mod_rdep(struct lxc_container *c0, struct lxc_container *c, bool inc
n
=
fscanf
(
f1
,
"%d"
,
&
v
);
fclose
(
f1
);
if
(
n
==
1
&&
v
==
0
)
{
remove
(
path
);
ret
=
remove
(
path
);
if
(
ret
<
0
)
ERROR
(
"%s - Failed to remove
\"
%s
\"
"
,
strerror
(
errno
),
path
);
n
=
0
;
}
}
...
...
src/lxc/tools/lxc_info.c
View file @
bbb97736
...
...
@@ -178,6 +178,7 @@ static void print_net_stats(struct lxc_container *c)
rc
=
lxc_read_from_file
(
path
,
buf
,
sizeof
(
buf
));
if
(
rc
>
0
)
{
buf
[
rc
-
1
]
=
'\0'
;
str_chomp
(
buf
);
rx_bytes
=
str_size_humanize
(
buf
,
sizeof
(
buf
));
printf
(
"%-15s %s
\n
"
,
" TX bytes:"
,
buf
);
...
...
@@ -190,6 +191,7 @@ static void print_net_stats(struct lxc_container *c)
rc
=
lxc_read_from_file
(
path
,
buf
,
sizeof
(
buf
));
if
(
rc
>
0
)
{
buf
[
rc
-
1
]
=
'\0'
;
str_chomp
(
buf
);
tx_bytes
=
str_size_humanize
(
buf
,
sizeof
(
buf
));
printf
(
"%-15s %s
\n
"
,
" RX bytes:"
,
buf
);
...
...
src/lxc/tools/lxc_ls.c
View file @
bbb97736
...
...
@@ -819,8 +819,8 @@ static void ls_print_fancy_format(struct ls *l, struct lengths *lht,
strcasecmp
(
*
s
,
"GROUPS"
)
&&
strcasecmp
(
*
s
,
"INTERFACE"
)
&&
strcasecmp
(
*
s
,
"IPV4"
)
&&
strcasecmp
(
*
s
,
"IPV6"
)
&&
strcasecmp
(
*
s
,
"UNPRIVILEGED"
))
{
lxc_free_array
((
void
**
)
tmp
,
free
);
fprintf
(
stderr
,
"Invalid key: %s
\n
"
,
*
s
);
lxc_free_array
((
void
**
)
tmp
,
free
);
return
;
}
}
...
...
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