]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: add BPF.NAME column
authorMasatake YAMATO <yamato@redhat.com>
Tue, 26 Sep 2023 16:12:16 +0000 (01:12 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Sat, 30 Sep 2023 12:16:36 +0000 (21:16 +0900)
commitbc8083680c0e84cc980f90ce111c83324a8f645c
tree682244019020bff939d15ad461f98343d8a2bbd9
parentae3a6367fda8bd0ecae5ae46d25c85d797e4c678
lsfd: add BPF.NAME column

An example output:

  $ sudo  ./lsfd -oCOMMAND,PID,ASSOC,TYPE,BPF.NAME,NAME -Q '(TYPE =~ "bpf-*")' -p 1
  COMMAND PID ASSOC     TYPE        BPF.NAME NAME
  systemd   1     9 bpf_link                 anon_inode:bpf_link
  systemd   1    13  bpf-map     cgroup_hash id=391 type=hash-of-maps name=cgroup_hash
  systemd   1    14 bpf-prog restrict_filesy id=8210 type=lsm name=restrict_filesy
  systemd   1    28 bpf-prog      sd_devices id=8298 type=cgroup_device name=sd_devices
  systemd   1    29 bpf-prog      sd_devices id=8299 type=cgroup_device name=sd_devices
  systemd   1    30 bpf-prog      sd_devices id=8300 type=cgroup_device name=sd_devices
  ...

Using memset was suggested by Thomas Weißschuh
<thomas@t-8ch.de>.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd-unkn.c
misc-utils/lsfd.c
misc-utils/lsfd.h