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
82bc16c5
Unverified
Commit
82bc16c5
authored
Feb 17, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands: cleanup macros lxc_cmd()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
9fb12c13
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
commands.c
src/lxc/commands.c
+3
-10
No files found.
src/lxc/commands.c
View file @
82bc16c5
...
@@ -278,7 +278,7 @@ static int lxc_cmd_send(const char *name, struct lxc_cmd_rr *cmd,
...
@@ -278,7 +278,7 @@ static int lxc_cmd_send(const char *name, struct lxc_cmd_rr *cmd,
static
int
lxc_cmd
(
const
char
*
name
,
struct
lxc_cmd_rr
*
cmd
,
int
*
stopped
,
static
int
lxc_cmd
(
const
char
*
name
,
struct
lxc_cmd_rr
*
cmd
,
int
*
stopped
,
const
char
*
lxcpath
,
const
char
*
hashed_sock_name
)
const
char
*
lxcpath
,
const
char
*
hashed_sock_name
)
{
{
int
client_fd
,
saved_errno
;
__do_close_prot_errno
int
client_fd
=
-
EBADF
;
int
ret
=
-
1
;
int
ret
=
-
1
;
bool
stay_connected
=
false
;
bool
stay_connected
=
false
;
...
@@ -303,15 +303,8 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped,
...
@@ -303,15 +303,8 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped,
if
(
ret
<
0
&&
errno
==
ECONNRESET
)
if
(
ret
<
0
&&
errno
==
ECONNRESET
)
*
stopped
=
1
;
*
stopped
=
1
;
if
(
!
stay_connected
||
ret
<=
0
)
{
if
(
stay_connected
&&
ret
>
0
)
saved_errno
=
errno
;
cmd
->
rsp
.
ret
=
steal_fd
(
client_fd
);
close
(
client_fd
);
errno
=
saved_errno
;
return
ret
;
}
if
(
stay_connected
)
cmd
->
rsp
.
ret
=
client_fd
;
return
ret
;
return
ret
;
}
}
...
...
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