aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/prog.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r--tools/bpf/bpftool/prog.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index f45c44ef9bec..ad619b96c276 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -41,7 +41,6 @@
41#include <string.h> 41#include <string.h>
42#include <time.h> 42#include <time.h>
43#include <unistd.h> 43#include <unistd.h>
44#include <net/if.h>
45#include <sys/types.h> 44#include <sys/types.h>
46#include <sys/stat.h> 45#include <sys/stat.h>
47 46
@@ -230,21 +229,6 @@ static void print_prog_json(struct bpf_prog_info *info, int fd)
230 info->tag[0], info->tag[1], info->tag[2], info->tag[3], 229 info->tag[0], info->tag[1], info->tag[2], info->tag[3],
231 info->tag[4], info->tag[5], info->tag[6], info->tag[7]); 230 info->tag[4], info->tag[5], info->tag[6], info->tag[7]);
232 231
233 if (info->status & BPF_PROG_STATUS_DEV_BOUND) {
234 jsonw_name(json_wtr, "dev");
235 if (info->ifindex) {
236 char name[IF_NAMESIZE];
237
238 if (!if_indextoname(info->ifindex, name))
239 jsonw_printf(json_wtr, "\"ifindex:%d\"",
240 info->ifindex);
241 else
242 jsonw_printf(json_wtr, "\"%s\"", name);
243 } else {
244 jsonw_printf(json_wtr, "\"unknown\"");
245 }
246 }
247
248 if (info->load_time) { 232 if (info->load_time) {
249 char buf[32]; 233 char buf[32];
250 234
@@ -302,21 +286,6 @@ static void print_prog_plain(struct bpf_prog_info *info, int fd)
302 286
303 printf("tag "); 287 printf("tag ");
304 fprint_hex(stdout, info->tag, BPF_TAG_SIZE, ""); 288 fprint_hex(stdout, info->tag, BPF_TAG_SIZE, "");
305 printf(" ");
306
307 if (info->status & BPF_PROG_STATUS_DEV_BOUND) {
308 printf("dev ");
309 if (info->ifindex) {
310 char name[IF_NAMESIZE];
311
312 if (!if_indextoname(info->ifindex, name))
313 printf("ifindex:%d ", info->ifindex);
314 else
315 printf("%s ", name);
316 } else {
317 printf("unknown ");
318 }
319 }
320 printf("\n"); 289 printf("\n");
321 290
322 if (info->load_time) { 291 if (info->load_time) {