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
b857f4be
Unverified
Commit
b857f4be
authored
Sep 23, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgfsng: s/__cgfsng_ops__/__cgfsng_ops/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
181a780f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
cgfsng.c
src/lxc/cgroups/cgfsng.c
+18
-20
compiler.h
src/lxc/compiler.h
+2
-0
No files found.
src/lxc/cgroups/cgfsng.c
View file @
b857f4be
...
@@ -67,8 +67,6 @@
...
@@ -67,8 +67,6 @@
#include "include/strlcat.h"
#include "include/strlcat.h"
#endif
#endif
#define __cgfsng_ops__
lxc_log_define
(
cgfsng
,
cgroup
);
lxc_log_define
(
cgfsng
,
cgroup
);
static
void
free_string_list
(
char
**
clist
)
static
void
free_string_list
(
char
**
clist
)
...
@@ -1104,7 +1102,7 @@ static int cgroup_rmdir_wrapper(void *data)
...
@@ -1104,7 +1102,7 @@ static int cgroup_rmdir_wrapper(void *data)
return
cgroup_rmdir
(
arg
->
hierarchies
,
arg
->
container_cgroup
);
return
cgroup_rmdir
(
arg
->
hierarchies
,
arg
->
container_cgroup
);
}
}
__cgfsng_ops
__
static
void
cgfsng_destroy
(
struct
cgroup_ops
*
ops
,
struct
lxc_handler
*
handler
)
__cgfsng_ops
static
void
cgfsng_destroy
(
struct
cgroup_ops
*
ops
,
struct
lxc_handler
*
handler
)
{
{
int
ret
;
int
ret
;
struct
generic_userns_exec_data
wrap
;
struct
generic_userns_exec_data
wrap
;
...
@@ -1256,7 +1254,7 @@ static void remove_path_for_hierarchy(struct hierarchy *h, char *cgname, bool mo
...
@@ -1256,7 +1254,7 @@ static void remove_path_for_hierarchy(struct hierarchy *h, char *cgname, bool mo
h
->
container_full_path
=
NULL
;
h
->
container_full_path
=
NULL
;
}
}
__cgfsng_ops
__
static
inline
bool
cgfsng_monitor_create
(
struct
cgroup_ops
*
ops
,
__cgfsng_ops
static
inline
bool
cgfsng_monitor_create
(
struct
cgroup_ops
*
ops
,
struct
lxc_handler
*
handler
)
struct
lxc_handler
*
handler
)
{
{
char
*
monitor_cgroup
;
char
*
monitor_cgroup
;
...
@@ -1295,7 +1293,7 @@ on_error:
...
@@ -1295,7 +1293,7 @@ on_error:
/* Try to create the same cgroup in all hierarchies. Start with cgroup_pattern;
/* Try to create the same cgroup in all hierarchies. Start with cgroup_pattern;
* next cgroup_pattern-1, -2, ..., -999.
* next cgroup_pattern-1, -2, ..., -999.
*/
*/
__cgfsng_ops
__
static
inline
bool
cgfsng_payload_create
(
struct
cgroup_ops
*
ops
,
__cgfsng_ops
static
inline
bool
cgfsng_payload_create
(
struct
cgroup_ops
*
ops
,
struct
lxc_handler
*
handler
)
struct
lxc_handler
*
handler
)
{
{
int
i
;
int
i
;
...
@@ -1370,7 +1368,7 @@ out_free:
...
@@ -1370,7 +1368,7 @@ out_free:
return
false
;
return
false
;
}
}
__cgfsng_ops
__
static
bool
__do_cgroup_enter
(
struct
cgroup_ops
*
ops
,
pid_t
pid
,
__cgfsng_ops
static
bool
__do_cgroup_enter
(
struct
cgroup_ops
*
ops
,
pid_t
pid
,
bool
monitor
)
bool
monitor
)
{
{
int
len
;
int
len
;
...
@@ -1402,7 +1400,7 @@ __cgfsng_ops__ static bool __do_cgroup_enter(struct cgroup_ops *ops, pid_t pid,
...
@@ -1402,7 +1400,7 @@ __cgfsng_ops__ static bool __do_cgroup_enter(struct cgroup_ops *ops, pid_t pid,
return
true
;
return
true
;
}
}
__cgfsng_ops
__
static
bool
cgfsng_monitor_enter
(
struct
cgroup_ops
*
ops
,
pid_t
pid
)
__cgfsng_ops
static
bool
cgfsng_monitor_enter
(
struct
cgroup_ops
*
ops
,
pid_t
pid
)
{
{
return
__do_cgroup_enter
(
ops
,
pid
,
true
);
return
__do_cgroup_enter
(
ops
,
pid
,
true
);
}
}
...
@@ -1511,7 +1509,7 @@ static int chown_cgroup_wrapper(void *data)
...
@@ -1511,7 +1509,7 @@ static int chown_cgroup_wrapper(void *data)
return
0
;
return
0
;
}
}
__cgfsng_ops
__
static
bool
cgfsng_chown
(
struct
cgroup_ops
*
ops
,
__cgfsng_ops
static
bool
cgfsng_chown
(
struct
cgroup_ops
*
ops
,
struct
lxc_conf
*
conf
)
struct
lxc_conf
*
conf
)
{
{
struct
generic_userns_exec_data
wrap
;
struct
generic_userns_exec_data
wrap
;
...
@@ -1661,7 +1659,7 @@ static inline int cg_mount_cgroup_full(int type, struct hierarchy *h,
...
@@ -1661,7 +1659,7 @@ static inline int cg_mount_cgroup_full(int type, struct hierarchy *h,
return
__cg_mount_direct
(
type
,
h
,
controllerpath
);
return
__cg_mount_direct
(
type
,
h
,
controllerpath
);
}
}
__cgfsng_ops
__
static
bool
cgfsng_mount
(
struct
cgroup_ops
*
ops
,
__cgfsng_ops
static
bool
cgfsng_mount
(
struct
cgroup_ops
*
ops
,
struct
lxc_handler
*
handler
,
struct
lxc_handler
*
handler
,
const
char
*
root
,
int
type
)
const
char
*
root
,
int
type
)
{
{
...
@@ -1812,7 +1810,7 @@ static int recursive_count_nrtasks(char *dirname)
...
@@ -1812,7 +1810,7 @@ static int recursive_count_nrtasks(char *dirname)
return
count
;
return
count
;
}
}
__cgfsng_ops
__
static
int
cgfsng_nrtasks
(
struct
cgroup_ops
*
ops
)
__cgfsng_ops
static
int
cgfsng_nrtasks
(
struct
cgroup_ops
*
ops
)
{
{
int
count
;
int
count
;
char
*
path
;
char
*
path
;
...
@@ -1827,7 +1825,7 @@ __cgfsng_ops__ static int cgfsng_nrtasks(struct cgroup_ops *ops)
...
@@ -1827,7 +1825,7 @@ __cgfsng_ops__ static int cgfsng_nrtasks(struct cgroup_ops *ops)
}
}
/* Only root needs to escape to the cgroup of its init. */
/* Only root needs to escape to the cgroup of its init. */
__cgfsng_ops
__
static
bool
cgfsng_escape
(
const
struct
cgroup_ops
*
ops
,
__cgfsng_ops
static
bool
cgfsng_escape
(
const
struct
cgroup_ops
*
ops
,
struct
lxc_conf
*
conf
)
struct
lxc_conf
*
conf
)
{
{
int
i
;
int
i
;
...
@@ -1854,7 +1852,7 @@ __cgfsng_ops__ static bool cgfsng_escape(const struct cgroup_ops *ops,
...
@@ -1854,7 +1852,7 @@ __cgfsng_ops__ static bool cgfsng_escape(const struct cgroup_ops *ops,
return
true
;
return
true
;
}
}
__cgfsng_ops
__
static
int
cgfsng_num_hierarchies
(
struct
cgroup_ops
*
ops
)
__cgfsng_ops
static
int
cgfsng_num_hierarchies
(
struct
cgroup_ops
*
ops
)
{
{
int
i
;
int
i
;
...
@@ -1864,7 +1862,7 @@ __cgfsng_ops__ static int cgfsng_num_hierarchies(struct cgroup_ops *ops)
...
@@ -1864,7 +1862,7 @@ __cgfsng_ops__ static int cgfsng_num_hierarchies(struct cgroup_ops *ops)
return
i
;
return
i
;
}
}
__cgfsng_ops
__
static
bool
cgfsng_get_hierarchies
(
struct
cgroup_ops
*
ops
,
int
n
,
char
***
out
)
__cgfsng_ops
static
bool
cgfsng_get_hierarchies
(
struct
cgroup_ops
*
ops
,
int
n
,
char
***
out
)
{
{
int
i
;
int
i
;
...
@@ -1884,7 +1882,7 @@ __cgfsng_ops__ static bool cgfsng_get_hierarchies(struct cgroup_ops *ops, int n,
...
@@ -1884,7 +1882,7 @@ __cgfsng_ops__ static bool cgfsng_get_hierarchies(struct cgroup_ops *ops, int n,
/* TODO: If the unified cgroup hierarchy grows a freezer controller this needs
/* TODO: If the unified cgroup hierarchy grows a freezer controller this needs
* to be adapted.
* to be adapted.
*/
*/
__cgfsng_ops
__
static
bool
cgfsng_unfreeze
(
struct
cgroup_ops
*
ops
)
__cgfsng_ops
static
bool
cgfsng_unfreeze
(
struct
cgroup_ops
*
ops
)
{
{
int
ret
;
int
ret
;
char
*
fullpath
;
char
*
fullpath
;
...
@@ -1903,7 +1901,7 @@ __cgfsng_ops__ static bool cgfsng_unfreeze(struct cgroup_ops *ops)
...
@@ -1903,7 +1901,7 @@ __cgfsng_ops__ static bool cgfsng_unfreeze(struct cgroup_ops *ops)
return
true
;
return
true
;
}
}
__cgfsng_ops
__
static
const
char
*
cgfsng_get_cgroup
(
struct
cgroup_ops
*
ops
,
__cgfsng_ops
static
const
char
*
cgfsng_get_cgroup
(
struct
cgroup_ops
*
ops
,
const
char
*
controller
)
const
char
*
controller
)
{
{
struct
hierarchy
*
h
;
struct
hierarchy
*
h
;
...
@@ -2002,7 +2000,7 @@ on_error:
...
@@ -2002,7 +2000,7 @@ on_error:
return
fret
;
return
fret
;
}
}
__cgfsng_ops
__
static
bool
cgfsng_attach
(
struct
cgroup_ops
*
ops
,
const
char
*
name
,
__cgfsng_ops
static
bool
cgfsng_attach
(
struct
cgroup_ops
*
ops
,
const
char
*
name
,
const
char
*
lxcpath
,
pid_t
pid
)
const
char
*
lxcpath
,
pid_t
pid
)
{
{
int
i
,
len
,
ret
;
int
i
,
len
,
ret
;
...
@@ -2049,7 +2047,7 @@ __cgfsng_ops__ static bool cgfsng_attach(struct cgroup_ops *ops, const char *nam
...
@@ -2049,7 +2047,7 @@ __cgfsng_ops__ static bool cgfsng_attach(struct cgroup_ops *ops, const char *nam
* don't have a cgroup_data set up, so we ask the running container through the
* don't have a cgroup_data set up, so we ask the running container through the
* commands API for the cgroup path.
* commands API for the cgroup path.
*/
*/
__cgfsng_ops
__
static
int
cgfsng_get
(
struct
cgroup_ops
*
ops
,
const
char
*
filename
,
__cgfsng_ops
static
int
cgfsng_get
(
struct
cgroup_ops
*
ops
,
const
char
*
filename
,
char
*
value
,
size_t
len
,
const
char
*
name
,
char
*
value
,
size_t
len
,
const
char
*
name
,
const
char
*
lxcpath
)
const
char
*
lxcpath
)
{
{
...
@@ -2088,7 +2086,7 @@ __cgfsng_ops__ static int cgfsng_get(struct cgroup_ops *ops, const char *filenam
...
@@ -2088,7 +2086,7 @@ __cgfsng_ops__ static int cgfsng_get(struct cgroup_ops *ops, const char *filenam
* don't have a cgroup_data set up, so we ask the running container through the
* don't have a cgroup_data set up, so we ask the running container through the
* commands API for the cgroup path.
* commands API for the cgroup path.
*/
*/
__cgfsng_ops
__
static
int
cgfsng_set
(
struct
cgroup_ops
*
ops
,
__cgfsng_ops
static
int
cgfsng_set
(
struct
cgroup_ops
*
ops
,
const
char
*
filename
,
const
char
*
value
,
const
char
*
filename
,
const
char
*
value
,
const
char
*
name
,
const
char
*
lxcpath
)
const
char
*
name
,
const
char
*
lxcpath
)
{
{
...
@@ -2323,7 +2321,7 @@ static bool __cg_unified_setup_limits(struct cgroup_ops *ops,
...
@@ -2323,7 +2321,7 @@ static bool __cg_unified_setup_limits(struct cgroup_ops *ops,
return
true
;
return
true
;
}
}
__cgfsng_ops
__
static
bool
cgfsng_setup_limits
(
struct
cgroup_ops
*
ops
,
__cgfsng_ops
static
bool
cgfsng_setup_limits
(
struct
cgroup_ops
*
ops
,
struct
lxc_conf
*
conf
,
struct
lxc_conf
*
conf
,
bool
do_devices
)
bool
do_devices
)
{
{
...
@@ -2635,7 +2633,7 @@ static bool cg_init(struct cgroup_ops *ops, struct lxc_conf *conf)
...
@@ -2635,7 +2633,7 @@ static bool cg_init(struct cgroup_ops *ops, struct lxc_conf *conf)
return
cg_hybrid_init
(
ops
,
relative
);
return
cg_hybrid_init
(
ops
,
relative
);
}
}
__cgfsng_ops
__
static
bool
cgfsng_data_init
(
struct
cgroup_ops
*
ops
)
__cgfsng_ops
static
bool
cgfsng_data_init
(
struct
cgroup_ops
*
ops
)
{
{
const
char
*
cgroup_pattern
;
const
char
*
cgroup_pattern
;
...
...
src/lxc/compiler.h
View file @
b857f4be
...
@@ -46,4 +46,6 @@
...
@@ -46,4 +46,6 @@
#endif
#endif
#endif
#endif
#define __cgfsng_ops
#endif
/* __LXC_COMPILER_H */
#endif
/* __LXC_COMPILER_H */
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