Index | Thread | Search

From:
Alexander Farber <alexander.farber@gmail.com>
Subject:
ldconfig(8): remove dead options from getopt
To:
tech@openbsd.org
Date:
Tue, 6 Jan 2026 16:12:33 +0100

Download raw body.

Thread
  • Alexander Farber:

    ldconfig(8): remove dead options from getopt

Hi,

ldconfig(8) has -D, -P, and -S in its getopt string but no corresponding
case handlers. These options fall through to default and trigger usage().
This removes the unused options.

ok?

Index: src/libexec/ld.so/ldconfig/ldconfig.c
===================================================================
RCS file: /cvs/src/libexec/ld.so/ldconfig/ldconfig.c,v
retrieving revision 1.39
diff -u -r1.39 ldconfig.c
--- src/libexec/ld.so/ldconfig/ldconfig.c 24 Oct 2021 21:24:20 -0000 1.39
+++ src/libexec/ld.so/ldconfig/ldconfig.c 6 Jan 2026 14:22:53 -0000
@@ -97,7 +97,7 @@
  if (pledge("stdio rpath wpath cpath tmppath fattr", NULL) == -1)
  err(1, "pledge");

- while ((c = getopt(argc, argv, "DmPrRsSUv")) != -1) {
+ while ((c = getopt(argc, argv, "mrRsUv")) != -1) {
  switch (c) {
  case 'R':
  rescan = 1;