Commit 660c182
committed
chore(libscap/engine/bpf): improve error logging
Right now if perf_event_mmap() fails, it will buffer some diagnostic
info using scap_errprintf(), spelling out which of the two mmap()
calls failed. However, upon detecting a failure, the calling function
will also call scap_errprintf() and therefore overwrite the previous log
line. This change:
a) adds the actual values passed to mmap() to the log line, so get a bit
more context
b) suppresses the subsequent scap_errprintf() invocation so to surface
the orignal log line instead.
Signed-off-by: Gerlando Falauto <[email protected]>1 parent e074796 commit 660c182
1 file changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
816 | | - | |
817 | | - | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
818 | 819 | | |
819 | 820 | | |
820 | 821 | | |
| |||
827 | 828 | | |
828 | 829 | | |
829 | 830 | | |
830 | | - | |
831 | | - | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
832 | 835 | | |
833 | 836 | | |
834 | 837 | | |
| |||
1538 | 1541 | | |
1539 | 1542 | | |
1540 | 1543 | | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
| 1544 | + | |
| 1545 | + | |
1545 | 1546 | | |
1546 | 1547 | | |
1547 | 1548 | | |
| |||
0 commit comments