]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: add flags, [-lL], representing file lock/lease states to XMODE column
authorMasatake YAMATO <yamato@redhat.com>
Wed, 5 Jul 2023 02:48:33 +0000 (11:48 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Wed, 5 Jul 2023 07:01:09 +0000 (16:01 +0900)
commit9e381503c035d7916f02156eda07001714574052
tree33c3397f5916c096aee865a26db385848efa93b9
parentdab72f18b6fed638f62ba48d16373820808fb0a9
lsfd: add flags, [-lL], representing file lock/lease states to XMODE column

The flags hide the details of locking: methods for locking (including
lease), mandatory or advisory, and ranges. The flags can be used only
for distinguishing three states: not locked, read (or shared) locked,
or write (or exclusive) locked.

An example output:

  # ./lsfd -Q '(XMODE =~ "....[lL]")'
  COMMAND             PID   USER ASSOC XMODE TYPE SOURCE MNTID     INODE NAME
  abrtd              1854   root     7 rw--L  REG  tmpfs    27      3093 /run/abrt/abrtd.pid
  ...
  qemu-system-x86 2846033   qemu    11 rw--l  REG   dm-2  1313   5146111 /var/lib/libvirt/images/acn.qcow2

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd-file.c
misc-utils/lsfd.1.adoc
misc-utils/lsfd.h
tests/expected/lsfd/column-xmode-XMODE-D-bit
tests/expected/lsfd/column-xmode-XMODE-r-bit
tests/expected/lsfd/column-xmode-XMODE-w-bit
tests/expected/lsfd/column-xmode-XMODE-x-bit