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
a7744f12
Unverified
Commit
a7744f12
authored
Feb 19, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: expose lxc_clear_cgroup2_devices()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
d6c06927
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
conf.c
src/lxc/conf.c
+3
-11
conf.h
src/lxc/conf.h
+13
-0
No files found.
src/lxc/conf.c
View file @
a7744f12
...
@@ -3710,17 +3710,9 @@ int lxc_clear_cgroups(struct lxc_conf *c, const char *key, int version)
...
@@ -3710,17 +3710,9 @@ int lxc_clear_cgroups(struct lxc_conf *c, const char *key, int version)
return
0
;
return
0
;
}
}
static
void
lxc_clear
_devices
(
struct
lxc_conf
*
conf
)
static
inline
void
lxc_clear_cgroups
_devices
(
struct
lxc_conf
*
conf
)
{
{
struct
lxc_list
*
list
=
&
(
conf
->
bpf_devices
).
device_item
;
lxc_clear_cgroup2_devices
(
&
conf
->
bpf_devices
);
struct
lxc_list
*
it
,
*
next
;
lxc_list_for_each_safe
(
it
,
list
,
next
)
{
lxc_list_del
(
it
);
free
(
it
);
}
lxc_list_init
(
&
(
conf
->
bpf_devices
).
device_item
);
}
}
int
lxc_clear_limits
(
struct
lxc_conf
*
c
,
const
char
*
key
)
int
lxc_clear_limits
(
struct
lxc_conf
*
c
,
const
char
*
key
)
...
@@ -3960,7 +3952,7 @@ void lxc_conf_free(struct lxc_conf *conf)
...
@@ -3960,7 +3952,7 @@ void lxc_conf_free(struct lxc_conf *conf)
lxc_clear_config_keepcaps
(
conf
);
lxc_clear_config_keepcaps
(
conf
);
lxc_clear_cgroups
(
conf
,
"lxc.cgroup"
,
CGROUP_SUPER_MAGIC
);
lxc_clear_cgroups
(
conf
,
"lxc.cgroup"
,
CGROUP_SUPER_MAGIC
);
lxc_clear_cgroups
(
conf
,
"lxc.cgroup2"
,
CGROUP2_SUPER_MAGIC
);
lxc_clear_cgroups
(
conf
,
"lxc.cgroup2"
,
CGROUP2_SUPER_MAGIC
);
lxc_clear_devices
(
conf
);
lxc_clear_
cgroups_
devices
(
conf
);
lxc_clear_hooks
(
conf
,
"lxc.hook"
);
lxc_clear_hooks
(
conf
,
"lxc.hook"
);
lxc_clear_mount_entries
(
conf
);
lxc_clear_mount_entries
(
conf
);
lxc_clear_idmaps
(
conf
);
lxc_clear_idmaps
(
conf
);
...
...
src/lxc/conf.h
View file @
a7744f12
...
@@ -570,4 +570,17 @@ static inline void put_lxc_rootfs(struct lxc_rootfs *rootfs, bool unpin)
...
@@ -570,4 +570,17 @@ static inline void put_lxc_rootfs(struct lxc_rootfs *rootfs, bool unpin)
}
}
}
}
static
inline
void
lxc_clear_cgroup2_devices
(
struct
bpf_devices
*
bpf_devices
)
{
struct
lxc_list
*
list
=
&
bpf_devices
->
device_item
;
struct
lxc_list
*
it
,
*
next
;
lxc_list_for_each_safe
(
it
,
list
,
next
)
{
lxc_list_del
(
it
);
free
(
it
);
}
lxc_list_init
(
&
bpf_devices
->
device_item
);
}
#endif
/* __LXC_CONF_H */
#endif
/* __LXC_CONF_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