From: Martin Wilck Date: Mon, 27 Oct 2025 16:59:50 +0000 (+0100) Subject: mdcheck: remove short options from getopt command line X-Git-Tag: mdadm-4.5~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d3ac0fc9ad4afc1b63ce47ce4d5071a2a47f1d0;p=thirdparty%2Fmdadm.git mdcheck: remove short options from getopt command line The short options for mdcheck have never worked. The current code silently assumes that e.g. "-d $X" will translate to "--duration $X" on return from getopt, which is not the case. Remove the short options. Attempts to use them will now result in an error. Signed-off-by: Martin Wilck --- diff --git a/misc/mdcheck b/misc/mdcheck index b4927984..2952af6f 100644 --- a/misc/mdcheck +++ b/misc/mdcheck @@ -50,7 +50,7 @@ devname() { echo -n "/dev/$dev" } -args=$(getopt -o hcd: -l help,continue,duration: -n mdcheck -- "$@") +args=$(getopt -o "" -l help,continue,duration: -n mdcheck -- "$@") rv=$? if [ $rv -ne 0 ]; then exit $rv; fi