From 4ed03a558a5eb611647f5fb46d3625f8c64d44dc Mon Sep 17 00:00:00 2001 From: wubijie Date: Sat, 1 Jul 2023 14:15:01 +0800 Subject: [PATCH] Format the output of libbpf --- src/drsnoop/drsnoop.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/drsnoop/drsnoop.c b/src/drsnoop/drsnoop.c index fa9fbf3d..ca26d41e 100644 --- a/src/drsnoop/drsnoop.c +++ b/src/drsnoop/drsnoop.c @@ -78,3 +78,16 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) } return 0; } + +static int libbpf_print_fn(enum libbpf_print_level level, const char *format, + va_list args) +{ + if (level == LIBBPF_DEBUG && !verbose) + return 0; + return vfprintf(stderr, format, args); +} + +static void sig_handler(int sig) +{ + exiting = 1; +} \ No newline at end of file -- Gitee