]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: add ERROR as a new type
authorMasatake YAMATO <yamato@redhat.com>
Mon, 15 Jan 2024 19:18:38 +0000 (04:18 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 2 Feb 2024 20:13:38 +0000 (05:13 +0900)
commita125e2eea7cea4d0bac1404c2e1b1d65d11cc10c
tree5ef4919922f4446a26c9d9456f661d42318132d7
parent80c8fcfd5185272ab396c464c7fb1ead7d2c4d11
lsfd: add ERROR as a new type

lsfd ignored file descriptors with that readlink(2) or
stat(2) returned errors.

With ERORR type, lsfd can print these file descriptors with incomplete
information.

An example output:

   COMMAND        PID   USER ASSOC  XMODE  TYPE          SOURCE MNTID INODE NAME
   systemd      10677 yamato    31 ????-- ERROR readlink:EACCES
   slirp4netns 901147 yamato     7 ????-- ERROR     stat:EACCES             /home/yamato/.local/share/.../merged

The format of SOURCE column is SYSCALL:ERRNO.

The code for printing errno name is highly based on the code for
printing syscall name in enosys.c.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
.gitignore
meson.build
misc-utils/Makemodule.am
misc-utils/lsfd-file.c
misc-utils/lsfd.1.adoc
misc-utils/lsfd.c
misc-utils/lsfd.h
tools/Makemodule.am
tools/all_errnos [new file with mode: 0755]