bcc/bcc-0.7.0-killsnoop-str-bytes.patch

26 lines
865 B
Diff
Raw Normal View History

From 1d2348027404307b6cd51c0c452207be27c64863 Mon Sep 17 00:00:00 2001
From: yonghong-song <ys114321@gmail.com>
Date: Thu, 11 Oct 2018 08:32:04 -0700
Subject: [PATCH] fix killsnoop.py srr/bytes type error (#2007)
Fix issue #2002
Signed-off-by: Yonghong Song <yhs@fb.com>
---
tools/killsnoop.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/killsnoop.py b/tools/killsnoop.py
index 89ea5cd93..d60c72e32 100755
--- a/tools/killsnoop.py
+++ b/tools/killsnoop.py
@@ -139,7 +139,7 @@ def print_event(cpu, data, size):
if (args.failed and (event.ret >= 0)):
return
- printb(b"%-9s %-6d %-16s %-4d %-6d %d" % (strftime("%H:%M:%S"),
+ printb(b"%-9s %-6d %-16s %-4d %-6d %d" % (strftime("%H:%M:%S").encode('ascii'),
event.pid, event.comm, event.sig, event.tpid, event.ret))
# loop with callback to print_event