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
7d2f7ae1
Unverified
Commit
7d2f7ae1
authored
Jan 30, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: use PTR_TO_U64()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
640952e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
cgroup2_devices.c
src/lxc/cgroups/cgroup2_devices.c
+3
-3
macro.h
src/lxc/macro.h
+2
-1
No files found.
src/lxc/cgroups/cgroup2_devices.c
View file @
7d2f7ae1
...
...
@@ -343,10 +343,10 @@ static int bpf_program_load_kernel(struct bpf_program *prog)
attr
=
&
(
union
bpf_attr
){
.
prog_type
=
prog
->
prog_type
,
.
insns
=
PTR_TO_U
INT
64
(
prog
->
instructions
),
.
insns
=
PTR_TO_U64
(
prog
->
instructions
),
.
insn_cnt
=
prog
->
n_instructions
,
.
license
=
PTR_TO_U
INT
64
(
"GPL"
),
.
log_buf
=
PTR_TO_U
INT
64
(
log_buf
),
.
license
=
PTR_TO_U64
(
"GPL"
),
.
log_buf
=
PTR_TO_U64
(
log_buf
),
.
log_level
=
log_level
,
.
log_size
=
log_size
,
};
...
...
src/lxc/macro.h
View file @
7d2f7ae1
...
...
@@ -602,7 +602,8 @@ enum {
#define PTR_TO_PID(p) ((pid_t)((intptr_t)(p)))
#define PID_TO_PTR(u) ((void *)((intptr_t)(u)))
#define PTR_TO_UINT64(p) ((uint64_t)((intptr_t)(p)))
#define PTR_TO_UINT64(p) ((uint64_t)((uintptr_t)(p)))
#define PTR_TO_U64(p) ((__u64)((uintptr_t)(p)))
#define UINT_TO_PTR(u) ((void *) ((uintptr_t) (u)))
#define PTR_TO_USHORT(p) ((unsigned short)((uintptr_t)(p)))
...
...
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