]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: error if extraneous argument given
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Thu, 16 Mar 2023 16:08:59 +0000 (17:08 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 17 Mar 2023 10:46:02 +0000 (11:46 +0100)
commit4a2d7c4725ad895fc1cd3f473e193352118fd4b0
treed50f775e226a816697fa10261d7ab85cfac2f020
parent57746ff0eb4305761baa51bee945e496574559ca
lsfd: error if extraneous argument given

The manual and help string both spec lsfd [options];
actually stick to that instead of ignoring subsequent arguments.

This is particularly a weird thing to allow given that lsof path
is legal and does something (either same as
lsfd -Q "MAJ:MIN == \"$(stat -c %Hd:%Ld path)\"" if it's a mountpoint or
lsfd -Q "NAME ~= '$path'" (sans the regex and escaping) otherwise).

This mirrors ec96a89ed9551ffacfc58b3056c8070444e3a2f3 for largely the
same reason.

Signed-off-by: Karel Zak <kzak@redhat.com>
Tested-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd.c