Skip to content

Commit 27f30d2

Browse files
committed
dropreason: suppress error msg in drop_reason_support()
Signed-off-by: Menglong Dong <imagedong@tencent.com>
1 parent faf3642 commit 27f30d2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/dropreason.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ static bool drop_reason_inited = false;
1818
bool drop_reason_support()
1919
{
2020
return simple_exec("cat /sys/kernel/debug/tracing/events/skb/"
21-
"kfree_skb/format | grep NOT_SPECIFIED") == 0;
21+
"kfree_skb/format 2>/dev/null | "
22+
"grep NOT_SPECIFIED") == 0;
2223
}
2324

2425
static int parse_reason_enum()

0 commit comments

Comments
 (0)