]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdcheck: remove short options from getopt command line
authorMartin Wilck <mwilck@suse.com>
Mon, 27 Oct 2025 16:59:50 +0000 (17:59 +0100)
committerMariusz Tkaczyk <mtkaczyk@kernel.org>
Tue, 4 Nov 2025 07:51:28 +0000 (08:51 +0100)
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 <mwilck@suse.com>
misc/mdcheck

index b49279848ba0c5bedbcee8b6fe6de3d80f570299..2952af6fb1a840102b28e36669c75968c9c2aba0 100644 (file)
@@ -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