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
35bfea7a
Commit
35bfea7a
authored
Jul 14, 2018
by
2xsec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: lxc-unshare: fix wrong coding rules
Signed-off-by:
2xsec
<
dh48.jeong@samsung.com
>
parent
727b9b16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
arguments.c
src/lxc/tools/arguments.c
+1
-2
lxc_unshare.c
src/lxc/tools/lxc_unshare.c
+5
-5
No files found.
src/lxc/tools/arguments.c
View file @
35bfea7a
...
@@ -338,4 +338,4 @@ bool lxc_setup_shared_ns(struct lxc_arguments *args, struct lxc_container *c)
...
@@ -338,4 +338,4 @@ bool lxc_setup_shared_ns(struct lxc_arguments *args, struct lxc_container *c)
}
}
return
true
;
return
true
;
}
}
\ No newline at end of file
src/lxc/tools/lxc_unshare.c
View file @
35bfea7a
...
@@ -71,7 +71,7 @@ static int mount_fs(const char *source, const char *target, const char *type);
...
@@ -71,7 +71,7 @@ static int mount_fs(const char *source, const char *target, const char *type);
static
void
lxc_setup_fs
(
void
);
static
void
lxc_setup_fs
(
void
);
static
int
do_start
(
void
*
arg
);
static
int
do_start
(
void
*
arg
);
static
struct
my_iflist
*
tmpif
,
*
my_iflist
=
NULL
;
static
struct
my_iflist
*
tmpif
,
*
my_iflist
;
static
const
struct
option
my_longopts
[]
=
{
static
const
struct
option
my_longopts
[]
=
{
{
"namespaces"
,
required_argument
,
0
,
's'
},
{
"namespaces"
,
required_argument
,
0
,
's'
},
...
@@ -128,7 +128,8 @@ static int my_parser(struct lxc_arguments *args, int c, char *arg)
...
@@ -128,7 +128,8 @@ static int my_parser(struct lxc_arguments *args, int c, char *arg)
args
->
want_hostname
=
arg
;
args
->
want_hostname
=
arg
;
break
;
break
;
case
'i'
:
case
'i'
:
if
(
!
(
tmpif
=
malloc
(
sizeof
(
*
tmpif
))))
{
tmpif
=
malloc
(
sizeof
(
*
tmpif
));
if
(
!
tmpif
)
{
SYSERROR
(
"Failed to malloc()"
);
SYSERROR
(
"Failed to malloc()"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -327,7 +328,7 @@ int main(int argc, char *argv[])
...
@@ -327,7 +328,7 @@ int main(int argc, char *argv[])
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
if
(
*
my_args
.
argv
==
NULL
)
{
if
(
!*
my_args
.
argv
)
{
ERROR
(
"A command to execute in the new namespace is required"
);
ERROR
(
"A command to execute in the new namespace is required"
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
...
@@ -443,4 +444,4 @@ int main(int argc, char *argv[])
...
@@ -443,4 +444,4 @@ int main(int argc, char *argv[])
/* Call exit() directly on this function because it retuns an exit code. */
/* Call exit() directly on this function because it retuns an exit code. */
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
}
}
\ No newline at end of file
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