]> git.ipfire.org Git - thirdparty/util-linux.git/commit
treewide: fix optional arguments usage
authorKarel Zak <kzak@redhat.com>
Mon, 7 Apr 2025 11:49:43 +0000 (13:49 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 7 Apr 2025 12:38:45 +0000 (14:38 +0200)
commitc4a24f5301ec9779a0492dd110824c2ce813f3eb
treee51fd18131078923051b97e94b2555f4118ac4f5
parent4b63ef9c6c9a6fe3d0381ba97af9ad6a738fd9c8
treewide: fix optional arguments usage

In some parts of the code, the optional argument handling is missing
for cases where the argument starts with '='. This is particularly
important for short options with optional arguments, as suggested by
our man pages. The libc getopt_long() handles this for long options,
but for short options, it's our responsibility.

Note that some argument parsing functions (mostly colormode_or_err())
already implement this, as they are usually used with optional
arguments.

Signed-off-by: Karel Zak <kzak@redhat.com>
lsfd-cmd/lsfd.c
misc-utils/enosys.c
misc-utils/uuidd.c
misc-utils/wipefs.c
sys-utils/ipcrm.c
sys-utils/nsenter.c