git: b828161d123b - main - ldconfig(8): nostd/-s does nothing

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 24 Nov 2021 23:56:20 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=b828161d123bec894bc5a320ef26d6afc9b13ae8

commit b828161d123bec894bc5a320ef26d6afc9b13ae8
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-11-19 05:21:21 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-11-24 23:55:03 +0000

    ldconfig(8): nostd/-s does nothing
    
    Remove the option from man page and summary.  Silently ignore it when
    parsing command line for backward compatibility.
    
    Reviewed by:    emaste
    Tested by:      jbeich
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D33058
---
 sbin/ldconfig/ldconfig.8 | 6 +-----
 sbin/ldconfig/ldconfig.c | 8 ++++----
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8
index 63e2271b7cd5..7718f018bc70 100644
--- a/sbin/ldconfig/ldconfig.8
+++ b/sbin/ldconfig/ldconfig.8
@@ -43,7 +43,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl 32
-.Op Fl Rimrsv
+.Op Fl Rimrv
 .Op Fl f Ar hints_file
 .Op Ar directory | Ar
 .Sh DESCRIPTION
@@ -128,10 +128,6 @@ on the standard output.
 The hints file is not modified.
 .Pp
 Scan and print all libraries found on the directories list.
-.It Fl s
-Do not scan the built-in system directory
-.Pq Dq /usr/lib
-for shared libraries.
 .It Fl v
 Switch on verbose mode.
 .El
diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c
index 3f623d6f38b1..777895936834 100644
--- a/sbin/ldconfig/ldconfig.c
+++ b/sbin/ldconfig/ldconfig.c
@@ -60,9 +60,9 @@ main(int argc, char **argv)
 {
 	const char *hints_file;
 	int c;
-	bool is_32, is_soft, justread, merge, nostd, rescan, verbose;
+	bool is_32, is_soft, justread, merge, rescan, verbose;
 
-	is_32 = is_soft = justread = merge = nostd = rescan = verbose = false;
+	is_32 = is_soft = justread = merge = rescan = verbose = false;
 
 	while (argc > 1) {
 		if (strcmp(argv[1], "-aout") == 0) {
@@ -109,7 +109,7 @@ main(int argc, char **argv)
 			justread = true;
 			break;
 		case 's':
-			nostd = true;
+			/* was nostd */
 			break;
 		case 'v':
 			verbose = true;
@@ -132,7 +132,7 @@ static void
 usage(void)
 {
 	fprintf(stderr,
-	    "usage: ldconfig [-32] [-elf] [-Rimrsv] [-f hints_file] "
+	    "usage: ldconfig [-32] [-elf] [-Rimrv] [-f hints_file] "
 	    "[directory | file ...]\n");
 	exit(1);
 }