hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/bpf/bpftool/perf.c
....@@ -1,4 +1,4 @@
1
-// SPDX-License-Identifier: GPL-2.0+
1
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22 // Copyright (C) 2018 Facebook
33 // Author: Yonghong Song <yhs@fb.com>
44
....@@ -13,7 +13,7 @@
1313 #include <unistd.h>
1414 #include <ftw.h>
1515
16
-#include <bpf.h>
16
+#include <bpf/bpf.h>
1717
1818 #include "main.h"
1919
....@@ -104,6 +104,8 @@
104104 jsonw_string_field(json_wtr, "filename", buf);
105105 jsonw_lluint_field(json_wtr, "offset", probe_offset);
106106 break;
107
+ default:
108
+ break;
107109 }
108110 jsonw_end_object(json_wtr);
109111 }
....@@ -139,6 +141,8 @@
139141 case BPF_FD_TYPE_URETPROBE:
140142 printf("uretprobe filename %s offset %llu\n", buf,
141143 probe_offset);
144
+ break;
145
+ default:
142146 break;
143147 }
144148 }
....@@ -227,7 +231,7 @@
227231 static int do_help(int argc, char **argv)
228232 {
229233 fprintf(stderr,
230
- "Usage: %s %s { show | list | help }\n"
234
+ "Usage: %1$s %2$s { show | list | help }\n"
231235 "",
232236 bin_name, argv[-2]);
233237