|
@@ -23,6 +23,9 @@ int bpf__unprobe(struct bpf_object *obj);
|
|
int bpf__strerror_probe(struct bpf_object *obj, int err,
|
|
int bpf__strerror_probe(struct bpf_object *obj, int err,
|
|
char *buf, size_t size);
|
|
char *buf, size_t size);
|
|
|
|
|
|
|
|
+int bpf__load(struct bpf_object *obj);
|
|
|
|
+int bpf__strerror_load(struct bpf_object *obj, int err,
|
|
|
|
+ char *buf, size_t size);
|
|
#else
|
|
#else
|
|
static inline struct bpf_object *
|
|
static inline struct bpf_object *
|
|
bpf__prepare_load(const char *filename __maybe_unused)
|
|
bpf__prepare_load(const char *filename __maybe_unused)
|
|
@@ -35,6 +38,7 @@ static inline void bpf__clear(void) { }
|
|
|
|
|
|
static inline int bpf__probe(struct bpf_object *obj __maybe_unused) { return 0;}
|
|
static inline int bpf__probe(struct bpf_object *obj __maybe_unused) { return 0;}
|
|
static inline int bpf__unprobe(struct bpf_object *obj __maybe_unused) { return 0;}
|
|
static inline int bpf__unprobe(struct bpf_object *obj __maybe_unused) { return 0;}
|
|
|
|
+static inline int bpf__load(struct bpf_object *obj __maybe_unused) { return 0; }
|
|
|
|
|
|
static inline int
|
|
static inline int
|
|
__bpf_strerror(char *buf, size_t size)
|
|
__bpf_strerror(char *buf, size_t size)
|
|
@@ -55,5 +59,12 @@ bpf__strerror_probe(struct bpf_object *obj __maybe_unused,
|
|
{
|
|
{
|
|
return __bpf_strerror(buf, size);
|
|
return __bpf_strerror(buf, size);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+static inline int bpf__strerror_load(struct bpf_object *obj __maybe_unused,
|
|
|
|
+ int err __maybe_unused,
|
|
|
|
+ char *buf, size_t size)
|
|
|
|
+{
|
|
|
|
+ return __bpf_strerror(buf, size);
|
|
|
|
+}
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|