]> git.ipfire.org Git - thirdparty/util-linux.git/commit
script: abort if unused arguments are given
authorChris Hofstaedtler <zeha@debian.org>
Fri, 18 Nov 2022 13:23:37 +0000 (13:23 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 21 Nov 2022 10:06:12 +0000 (11:06 +0100)
commitec96a89ed9551ffacfc58b3056c8070444e3a2f3
treeea01ef2dcab0dc223d3cf3c20179bb3876ee80af
parent1e13ebbbda9e524de247095dcec6ad75a065b8b0
script: abort if unused arguments are given

scripts uses either a free-standing "file" argument, or the value
passed as --log-out "file". Additional filenames are ignored.
They are also ignored if --log-in "file" is given, as it turns off
output logging by default (can still be overriden by adding --log-out).
Avoid surprises when passing multiple filenames by writing usage
message instead.

[kzak@redhat.com: - use errtryhelp() rather than usage()]

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016193
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/script.c