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
885bb002
Unverified
Commit
885bb002
authored
Feb 25, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands: port misnamed functions to general style
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
daad4f95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
24 deletions
+23
-24
commands.c
src/lxc/commands.c
+23
-24
No files found.
src/lxc/commands.c
View file @
885bb002
...
...
@@ -812,9 +812,10 @@ static int lxc_cmd_get_clone_flags_callback(int fd, struct lxc_cmd_req *req,
return
lxc_cmd_rsp_send_reap
(
fd
,
&
rsp
);
}
static
char
*
lxc_cmd_get_cgroup_path_do
(
const
char
*
name
,
const
char
*
lxcpath
,
const
char
*
controller
,
lxc_cmd_t
command
)
static
char
*
lxc_cmd_get_cgroup_path_callback
(
const
char
*
name
,
const
char
*
lxcpath
,
const
char
*
controller
,
lxc_cmd_t
command
)
{
bool
stopped
=
false
;
ssize_t
ret
;
...
...
@@ -837,9 +838,9 @@ static char *lxc_cmd_get_cgroup_path_do(const char *name, const char *lxcpath,
* it sees an unknown command and just closes the
* socket, sending us an EOF.
*/
return
lxc_cmd_get_cgroup_path_
do
(
name
,
lxcpath
,
controller
,
LXC_CMD_GET_CGROUP
);
return
lxc_cmd_get_cgroup_path_
callback
(
name
,
lxcpath
,
controller
,
LXC_CMD_GET_CGROUP
);
}
return
NULL
;
}
...
...
@@ -865,8 +866,8 @@ static char *lxc_cmd_get_cgroup_path_do(const char *name, const char *lxcpath,
char
*
lxc_cmd_get_cgroup_path
(
const
char
*
name
,
const
char
*
lxcpath
,
const
char
*
controller
)
{
return
lxc_cmd_get_cgroup_path_
do
(
name
,
lxcpath
,
controller
,
LXC_CMD_GET_CGROUP
);
return
lxc_cmd_get_cgroup_path_
callback
(
name
,
lxcpath
,
controller
,
LXC_CMD_GET_CGROUP
);
}
/*
...
...
@@ -886,14 +887,14 @@ char *lxc_cmd_get_cgroup_path(const char *name, const char *lxcpath,
char
*
lxc_cmd_get_limit_cgroup_path
(
const
char
*
name
,
const
char
*
lxcpath
,
const
char
*
controller
)
{
return
lxc_cmd_get_cgroup_path_
do
(
name
,
lxcpath
,
controller
,
LXC_CMD_GET_LIMIT_CGROUP
);
return
lxc_cmd_get_cgroup_path_
callback
(
name
,
lxcpath
,
controller
,
LXC_CMD_GET_LIMIT_CGROUP
);
}
static
int
lxc_cmd_get_cgroup_callback_do
(
int
fd
,
struct
lxc_cmd_req
*
req
,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
,
bool
limiting_cgroup
)
static
int
__lxc_cmd_get_cgroup_callback
(
int
fd
,
struct
lxc_cmd_req
*
req
,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
,
bool
limiting_cgroup
)
{
ssize_t
ret
;
const
char
*
path
;
...
...
@@ -930,14 +931,14 @@ static int lxc_cmd_get_cgroup_callback(int fd, struct lxc_cmd_req *req,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
)
{
return
lxc_cmd_get_cgroup_callback_do
(
fd
,
req
,
handler
,
descr
,
false
);
return
__lxc_cmd_get_cgroup_callback
(
fd
,
req
,
handler
,
descr
,
false
);
}
static
int
lxc_cmd_get_limit_cgroup_callback
(
int
fd
,
struct
lxc_cmd_req
*
req
,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
)
{
return
lxc_cmd_get_cgroup_callback_do
(
fd
,
req
,
handler
,
descr
,
true
);
return
__lxc_cmd_get_cgroup_callback
(
fd
,
req
,
handler
,
descr
,
true
);
}
/*
...
...
@@ -1767,10 +1768,10 @@ int lxc_cmd_get_limit_cgroup2_fd(const char *name, const char *lxcpath)
return
PTR_TO_INT
(
cmd
.
rsp
.
data
);
}
static
int
lxc_cmd_get_cgroup2_fd_callback_do
(
int
fd
,
struct
lxc_cmd_req
*
req
,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
,
bool
limiting_cgroup
)
static
int
__lxc_cmd_get_cgroup2_fd_callback
(
int
fd
,
struct
lxc_cmd_req
*
req
,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
,
bool
limiting_cgroup
)
{
struct
lxc_cmd_rsp
rsp
=
{
.
ret
=
-
EINVAL
,
...
...
@@ -1797,16 +1798,14 @@ static int lxc_cmd_get_cgroup2_fd_callback(int fd, struct lxc_cmd_req *req,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
)
{
return
lxc_cmd_get_cgroup2_fd_callback_do
(
fd
,
req
,
handler
,
descr
,
false
);
return
__lxc_cmd_get_cgroup2_fd_callback
(
fd
,
req
,
handler
,
descr
,
false
);
}
static
int
lxc_cmd_get_limit_cgroup2_fd_callback
(
int
fd
,
struct
lxc_cmd_req
*
req
,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
)
{
return
lxc_cmd_get_cgroup2_fd_callback_do
(
fd
,
req
,
handler
,
descr
,
true
);
return
__lxc_cmd_get_cgroup2_fd_callback
(
fd
,
req
,
handler
,
descr
,
true
);
}
static
int
lxc_cmd_rsp_send_enosys
(
int
fd
,
int
id
)
...
...
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