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
e490acc4
Unverified
Commit
e490acc4
authored
Feb 18, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpf: use return macros
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
789bf479
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
cgroup2_devices.h
src/lxc/cgroups/cgroup2_devices.h
+11
-16
No files found.
src/lxc/cgroups/cgroup2_devices.h
View file @
e490acc4
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include "compiler.h"
#include "compiler.h"
#include "conf.h"
#include "conf.h"
#include "config.h"
#include "config.h"
#include "macro.h"
#include "memory_utils.h"
#include "memory_utils.h"
#include "syscall_numbers.h"
#include "syscall_numbers.h"
...
@@ -72,41 +73,36 @@ __hidden extern int bpf_list_add_device(struct lxc_conf *conf, struct device_ite
...
@@ -72,41 +73,36 @@ __hidden extern int bpf_list_add_device(struct lxc_conf *conf, struct device_ite
static
inline
struct
bpf_program
*
bpf_program_new
(
uint32_t
prog_type
)
static
inline
struct
bpf_program
*
bpf_program_new
(
uint32_t
prog_type
)
{
{
errno
=
ENOSYS
;
return
ret_set_errno
(
NULL
,
ENOSYS
);
return
NULL
;
}
}
static
inline
int
bpf_program_init
(
struct
bpf_program
*
prog
)
static
inline
int
bpf_program_init
(
struct
bpf_program
*
prog
)
{
{
errno
=
ENOSYS
;
return
ret_errno
(
ENOSYS
);
return
-
1
;
}
}
static
inline
int
bpf_program_append_device
(
struct
bpf_program
*
prog
,
char
type
,
static
inline
int
bpf_program_append_device
(
struct
bpf_program
*
prog
,
char
type
,
int
major
,
int
minor
,
int
major
,
int
minor
,
const
char
*
access
,
int
allow
)
const
char
*
access
,
int
allow
)
{
{
errno
=
ENOSYS
;
return
ret_errno
(
ENOSYS
);
return
-
1
;
}
}
static
inline
int
bpf_program_finalize
(
struct
bpf_program
*
prog
)
static
inline
int
bpf_program_finalize
(
struct
bpf_program
*
prog
)
{
{
errno
=
ENOSYS
;
return
ret_errno
(
ENOSYS
);
return
-
1
;
}
}
static
inline
int
bpf_program_cgroup_attach
(
struct
bpf_program
*
prog
,
int
type
,
static
inline
int
bpf_program_cgroup_attach
(
struct
bpf_program
*
prog
,
int
type
,
const
char
*
path
,
uint32_t
flags
)
int
fd_cgroup
,
int
replace_bpf_fd
,
uint32_t
flags
)
{
{
errno
=
ENOSYS
;
return
ret_errno
(
ENOSYS
);
return
-
1
;
}
}
static
inline
int
bpf_program_cgroup_detach
(
struct
bpf_program
*
prog
)
static
inline
int
bpf_program_cgroup_detach
(
struct
bpf_program
*
prog
)
{
{
errno
=
ENOSYS
;
return
ret_errno
(
ENOSYS
);
return
-
1
;
}
}
static
inline
void
bpf_program_free
(
struct
bpf_program
*
prog
)
static
inline
void
bpf_program_free
(
struct
bpf_program
*
prog
)
...
@@ -119,14 +115,13 @@ static inline void bpf_device_program_free(struct cgroup_ops *ops)
...
@@ -119,14 +115,13 @@ static inline void bpf_device_program_free(struct cgroup_ops *ops)
static
inline
bool
bpf_devices_cgroup_supported
(
void
)
static
inline
bool
bpf_devices_cgroup_supported
(
void
)
{
{
return
false
;
return
ret_set_errno
(
false
,
ENOSYS
)
;
}
}
static
inline
int
bpf_list_add_device
(
struct
lxc_conf
*
conf
,
static
inline
int
bpf_list_add_device
(
struct
lxc_conf
*
conf
,
struct
device_item
*
device
)
struct
device_item
*
device
)
{
{
errno
=
ENOSYS
;
return
ret_errno
(
ENOSYS
);
return
-
1
;
}
}
#endif
/* !HAVE_STRUCT_BPF_CGROUP_DEV_CTX */
#endif
/* !HAVE_STRUCT_BPF_CGROUP_DEV_CTX */
...
...
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