]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
wdctl: remove -d option leftover
authorMunehisa Kamata <kamatam@amazon.com>
Tue, 28 Oct 2025 19:54:17 +0000 (12:54 -0700)
committerKarel Zak <kzak@redhat.com>
Mon, 3 Nov 2025 12:51:42 +0000 (13:51 +0100)
-d option was removed in commit f56338b43973 ("wdctl: allow to specify more
than one device"), but the optstring wasn't updated at that time and wdctl
can still accept the option halfway as below:

 $ wdctl -d
 wdctl: option requires an argument -- 'd'

whereas it should say:

 wdctl: invalid option -- 'd'

So update the optstring.

Fixes: f56338b43973 ("wdctl: allow to specify more than one device")
Signed-off-by: Munehisa Kamata <kamatam@amazon.com>
sys-utils/wdctl.c

index f3ae0e3f8c67f378ad72893b48d9c37bd4abb136..0cf8ee7a436330b94f9ad5826c2adda3e8774b33 100644 (file)
@@ -779,7 +779,7 @@ int main(int argc, char *argv[])
        close_stdout_atexit();
 
        while ((c = getopt_long(argc, argv,
-                               "d:f:g:hFnITp:o:s:OrVx", long_opts, NULL)) != -1) {
+                               "f:g:hFnITp:o:s:OrVx", long_opts, NULL)) != -1) {
 
                err_exclusive_options(c, long_opts, excl, excl_st);