Skip to contentSkip to conversation

wdctl: remove -d option leftover

PATCH In review Munehisa Kamata 2 participants 2 messages Oct 28, 2025 – Nov 3, 2025 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wdctl: remove -d option leftover

-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")
---
 sys-utils/wdctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sys-utils/wdctl.c +1 -1
index f3ae0e3f8..0cf8ee7a4 100644
@@ -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);
 
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 2 lines · Munehisa Kamata
 sys-utils/wdctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Good catch. Applied, thanks!

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com