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
0c5859ff
Unverified
Commit
0c5859ff
authored
Mar 15, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree-wide: remove "name" argument from lxc_{fini,abort}()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
7bdf97d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
criu.c
src/lxc/criu.c
+3
-3
start.c
src/lxc/start.c
+9
-8
start.h
src/lxc/start.h
+2
-2
No files found.
src/lxc/criu.c
View file @
0c5859ff
...
...
@@ -1134,8 +1134,8 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
ret
=
lxc_poll
(
c
->
name
,
handler
);
if
(
ret
)
lxc_abort
(
c
->
name
,
handler
);
lxc_fini
(
c
->
name
,
handler
);
lxc_abort
(
handler
);
lxc_fini
(
handler
);
_exit
(
ret
);
}
...
...
@@ -1145,7 +1145,7 @@ out_fini_handler:
if
(
pipes
[
1
]
>=
0
)
close
(
pipes
[
1
]);
lxc_fini
(
c
->
name
,
handler
);
lxc_fini
(
handler
);
out:
if
(
status_pipe
>=
0
)
{
...
...
src/lxc/start.c
View file @
0c5859ff
...
...
@@ -860,13 +860,14 @@ out_restore_sigmask:
return
-
1
;
}
void
lxc_fini
(
const
char
*
name
,
struct
lxc_handler
*
handler
)
void
lxc_fini
(
struct
lxc_handler
*
handler
)
{
int
ret
;
pid_t
self
;
struct
lxc_list
*
cur
,
*
next
;
char
*
namespaces
[
LXC_NS_MAX
+
1
];
size_t
namespace_count
=
0
;
const
char
*
name
=
handler
->
name
;
struct
cgroup_ops
*
cgroup_ops
=
handler
->
cgroup_ops
;
/* The STOPPING state is there for future cleanup code which can take
...
...
@@ -1010,12 +1011,12 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
lxc_free_handler
(
handler
);
}
void
lxc_abort
(
const
char
*
name
,
struct
lxc_handler
*
handler
)
void
lxc_abort
(
struct
lxc_handler
*
handler
)
{
int
ret
=
0
;
int
status
;
lxc_set_state
(
name
,
handler
,
ABORTING
);
lxc_set_state
(
handler
->
name
,
handler
,
ABORTING
);
if
(
handler
->
pidfd
>=
0
)
{
ret
=
lxc_raw_pidfd_send_signal
(
handler
->
pidfd
,
SIGKILL
,
NULL
,
0
);
...
...
@@ -1870,7 +1871,7 @@ out_delete_net:
lxc_delete_network
(
handler
);
out_abort:
lxc_abort
(
name
,
handler
);
lxc_abort
(
handler
);
out_sync_fini:
lxc_sync_fini
(
handler
);
...
...
@@ -2006,21 +2007,21 @@ __private_goto2:
detach_block_device
(
handler
->
conf
);
__private_goto3:
lxc_fini
(
name
,
handler
);
lxc_fini
(
handler
);
return
ret
;
/* These are the droids you are looking for. */
out_abort:
lxc_abort
(
name
,
handler
);
lxc_abort
(
handler
);
goto
__private_goto3
;
out_detach_blockdev:
lxc_abort
(
name
,
handler
);
lxc_abort
(
handler
);
goto
__private_goto2
;
out_delete_network:
lxc_abort
(
name
,
handler
);
lxc_abort
(
handler
);
goto
__private_goto1
;
}
...
...
src/lxc/start.h
View file @
0c5859ff
...
...
@@ -142,7 +142,7 @@ extern int lxc_set_state(const char *name, struct lxc_handler *handler,
extern
int
lxc_serve_state_clients
(
const
char
*
name
,
struct
lxc_handler
*
handler
,
lxc_state_t
state
);
extern
void
lxc_abort
(
const
char
*
name
,
struct
lxc_handler
*
handler
);
extern
void
lxc_abort
(
struct
lxc_handler
*
handler
);
extern
struct
lxc_handler
*
lxc_init_handler
(
const
char
*
name
,
struct
lxc_conf
*
conf
,
const
char
*
lxcpath
,
...
...
@@ -150,7 +150,7 @@ extern struct lxc_handler *lxc_init_handler(const char *name,
extern
void
lxc_zero_handler
(
struct
lxc_handler
*
handler
);
extern
void
lxc_free_handler
(
struct
lxc_handler
*
handler
);
extern
int
lxc_init
(
const
char
*
name
,
struct
lxc_handler
*
handler
);
extern
void
lxc_fini
(
const
char
*
name
,
struct
lxc_handler
*
handler
);
extern
void
lxc_fini
(
struct
lxc_handler
*
handler
);
/* lxc_check_inherited: Check for any open file descriptors and close them if
* requested.
...
...
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