Skip to content

Commit

Permalink
Remove extra whitespace at the end of a line.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rtoax committed May 25, 2022
1 parent 5bbcfb1 commit 6da721e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions examples/tracing/undump.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
#
# undump Dump UNIX socket packets.
# For Linux, uses BCC, eBPF. Embedded C.
# USAGE: undump [-h] [-t] [-p PID]
Expand Down Expand Up @@ -35,7 +35,7 @@
description="Dump UNIX socket packets",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog=examples)

parser.add_argument("-p", "--pid",
help="trace this PID only")
args = parser.parse_args()
Expand Down Expand Up @@ -75,22 +75,22 @@
FILTER_PID
struct sk_buff *skb = (struct sk_buff *)PT_REGS_PARM1(ctx);
struct sk_buff *skb = (struct sk_buff *)PT_REGS_PARM1(ctx);
struct recv_data_t *data = unix_data.lookup(&zero);
if (!data)
if (!data)
return 0;
unsigned int data_len = skb->len;
if(data_len > MAX_PKT)
return 0;
void *iodata = (void *)skb->data;
data->recv_len = data_len;
bpf_probe_read(data->pkt, data_len, iodata);
unix_recv_events.perf_submit(ctx, data, data_len+sizeof(u32));
return 0;
}
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/tracing/undump_example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Tracing PID=49264 UNIX socket packets ... Hit Ctrl-C to end

# Here print bytes of receive
PID 49264 Recv 13 bytes
48 65 6c 6c 6f 2c 20 57 6f 72 6c 64 0a
48 65 6c 6c 6f 2c 20 57 6f 72 6c 64 0a
PID 49264 Recv 8 bytes
61 62 63 64 65 66 67 0a
```
Expand Down

0 comments on commit 6da721e

Please sign in to comment.