bpf-link: prefix function names with "bpf_"
we generally do this for all bpf functions, do so here too.
This commit is contained in:
@@ -140,7 +140,7 @@ int bpf_socket_bind_supported(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return can_link_bpf_program(obj->progs.sd_bind4);
|
||||
return bpf_can_link_program(obj->progs.sd_bind4);
|
||||
}
|
||||
|
||||
int bpf_socket_bind_add_initial_link_fd(Unit *u, int fd) {
|
||||
@@ -226,11 +226,11 @@ int bpf_serialize_socket_bind(Unit *u, FILE *f, FDSet *fds) {
|
||||
|
||||
assert(u);
|
||||
|
||||
r = serialize_bpf_link(f, fds, "ipv4-socket-bind-bpf-link", u->ipv4_socket_bind_link);
|
||||
r = bpf_serialize_link(f, fds, "ipv4-socket-bind-bpf-link", u->ipv4_socket_bind_link);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return serialize_bpf_link(f, fds, "ipv6-socket-bind-bpf-link", u->ipv6_socket_bind_link);
|
||||
return bpf_serialize_link(f, fds, "ipv6-socket-bind-bpf-link", u->ipv6_socket_bind_link);
|
||||
}
|
||||
|
||||
#else /* ! BPF_FRAMEWORK */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "bpf-link.h"
|
||||
#include "serialize.h"
|
||||
|
||||
bool can_link_bpf_program(struct bpf_program *prog) {
|
||||
bool bpf_can_link_program(struct bpf_program *prog) {
|
||||
_cleanup_(bpf_link_freep) struct bpf_link *link = NULL;
|
||||
|
||||
assert(prog);
|
||||
@@ -19,7 +19,7 @@ bool can_link_bpf_program(struct bpf_program *prog) {
|
||||
return sym_libbpf_get_error(link) == -EBADF;
|
||||
}
|
||||
|
||||
int serialize_bpf_link(FILE *f, FDSet *fds, const char *key, struct bpf_link *link) {
|
||||
int bpf_serialize_link(FILE *f, FDSet *fds, const char *key, struct bpf_link *link) {
|
||||
assert(key);
|
||||
|
||||
if (!link)
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#include "fdset.h"
|
||||
#include "macro.h"
|
||||
|
||||
bool can_link_bpf_program(struct bpf_program *prog);
|
||||
bool bpf_can_link_program(struct bpf_program *prog);
|
||||
|
||||
int serialize_bpf_link(FILE *f, FDSet *fds, const char *key, struct bpf_link *link);
|
||||
int bpf_serialize_link(FILE *f, FDSet *fds, const char *key, struct bpf_link *link);
|
||||
|
||||
struct bpf_link *bpf_link_free(struct bpf_link *p);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(struct bpf_link *, bpf_link_free);
|
||||
|
||||
Reference in New Issue
Block a user