Add support for BPF program custom errors (#5743)

* Add support for BPF program custom errors

* Rename SOL_SUCCESS -> SUCCESS
This commit is contained in:
Justin Starry
2019-09-06 16:05:01 -07:00
committed by GitHub
parent d3052d094c
commit 81c36699c4
26 changed files with 108 additions and 67 deletions

View File

@@ -3,15 +3,14 @@
struct foo {const uint8_t *input;};
void foo(const uint8_t *input, struct foo foo) ;
extern bool entrypoint(const uint8_t *input) {
extern uint32_t entrypoint(const uint8_t *input) {
struct foo f;
f.input = input;
foo(input, f);
return true;
return SUCCESS;
}
void foo(const uint8_t *input, struct foo foo) {
sol_log_64(0, 0, 0, (uint64_t)input, (uint64_t)foo.input);
sol_assert(input == foo.input);
}