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
501751d0
Unverified
Commit
501751d0
authored
Aug 21, 2018
by
Christian Brauner
Committed by
GitHub
Aug 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2555 from tcharding/clang-format-cmd
cmd: Fix format issues found by clang-format
parents
3c841086
2ec1c484
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
lxc_init.c
src/lxc/cmd/lxc_init.c
+2
-2
lxc_monitord.c
src/lxc/cmd/lxc_monitord.c
+4
-4
lxc_user_nic.c
src/lxc/cmd/lxc_user_nic.c
+9
-9
No files found.
src/lxc/cmd/lxc_init.c
View file @
501751d0
...
...
@@ -22,6 +22,7 @@
*/
#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <getopt.h>
#include <libgen.h>
...
...
@@ -30,11 +31,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <
ctype
.h>
#include <
unistd
.h>
#include <lxc/lxccontainer.h>
#include <lxc/version.h>
...
...
src/lxc/cmd/lxc_monitord.c
View file @
501751d0
...
...
@@ -24,21 +24,21 @@
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <pthread.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <net/if.h>
#include <netinet/in.h>
#include <setjmp.h>
#include <sys/epoll.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include <lxc/lxccontainer.h>
...
...
src/lxc/cmd/lxc_user_nic.c
View file @
501751d0
...
...
@@ -555,14 +555,14 @@ static int create_nic(char *nic, char *br, int pid, char **cnic)
ret
=
lxc_netdev_set_mtu
(
veth1buf
,
mtu
);
if
(
ret
<
0
)
{
usernic_error
(
"Failed to set mtu to %d on %s
\n
"
,
mtu
,
veth1buf
);
mtu
,
veth1buf
);
goto
out_del
;
}
ret
=
lxc_netdev_set_mtu
(
veth2buf
,
mtu
);
if
(
ret
<
0
)
{
usernic_error
(
"Failed to set mtu to %d on %s
\n
"
,
mtu
,
veth2buf
);
mtu
,
veth2buf
);
goto
out_del
;
}
}
...
...
@@ -579,7 +579,7 @@ static int create_nic(char *nic, char *br, int pid, char **cnic)
ret
=
lxc_netdev_move_by_name
(
veth2buf
,
pid
,
NULL
);
if
(
ret
<
0
)
{
usernic_error
(
"Error moving %s to network namespace of %d
\n
"
,
veth2buf
,
pid
);
veth2buf
,
pid
);
goto
out_del
;
}
...
...
@@ -1006,7 +1006,7 @@ static bool may_access_netns(int pid)
ret
=
access
(
s
,
R_OK
);
may_access
=
true
;
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
may_access
=
false
;
CMD_SYSERROR
(
"Uid %d may not access %s
\n
"
,
(
int
)
ruid
,
s
);
}
...
...
@@ -1232,7 +1232,7 @@ int main(int argc, char *argv[])
close
(
netns_fd
);
if
(
!
has_priv
)
{
usernic_error
(
"%s"
,
"Process is not privileged over "
"network namespace
\n
"
);
"network namespace
\n
"
);
_exit
(
EXIT_FAILURE
);
}
}
...
...
@@ -1247,7 +1247,7 @@ int main(int argc, char *argv[])
if
(
!
is_ovs_bridge
(
args
.
link
))
{
usernic_error
(
"%s"
,
"Deletion of non ovs type network "
"devices not implemented
\n
"
);
"devices not implemented
\n
"
);
close
(
fd
);
free_alloted
(
&
alloted
);
_exit
(
EXIT_FAILURE
);
...
...
@@ -1267,15 +1267,15 @@ int main(int argc, char *argv[])
if
(
!
found_nicname
)
{
usernic_error
(
"Caller is not allowed to delete network "
"device
\"
%s
\"\n
"
,
args
.
veth_name
);
"device
\"
%s
\"\n
"
,
args
.
veth_name
);
_exit
(
EXIT_FAILURE
);
}
ret
=
lxc_ovs_delete_port
(
args
.
link
,
args
.
veth_name
);
if
(
ret
<
0
)
{
usernic_error
(
"Failed to remove port
\"
%s
\"
from "
"openvswitch bridge
\"
%s
\"
"
,
args
.
veth_name
,
args
.
link
);
"openvswitch bridge
\"
%s
\"
"
,
args
.
veth_name
,
args
.
link
);
_exit
(
EXIT_FAILURE
);
}
...
...
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