summaryrefslogtreecommitdiffstats
path: root/sbin/ldconfig
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2000-07-09 19:12:49 +0000
committerjdp <jdp@FreeBSD.org>2000-07-09 19:12:49 +0000
commit1d0099e346a1a0328a8b0400f678ce8174b6db9b (patch)
tree726af808421405f100220d1c23fba38e5b6400ee /sbin/ldconfig
parentd035f7d8d4da7f27b9e06a058dfe3f1bdfac93f3 (diff)
downloadFreeBSD-src-1d0099e346a1a0328a8b0400f678ce8174b6db9b.zip
FreeBSD-src-1d0099e346a1a0328a8b0400f678ce8174b6db9b.tar.gz
Make "ldconfig" with no arguments behave the same as "ldconfig -R".
Submitted by: Maxime Henrion <mhenrion@cybercable.fr>
Diffstat (limited to 'sbin/ldconfig')
-rw-r--r--sbin/ldconfig/ldconfig.81
-rw-r--r--sbin/ldconfig/ldconfig.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8
index e815657..8f4f801 100644
--- a/sbin/ldconfig/ldconfig.8
+++ b/sbin/ldconfig/ldconfig.8
@@ -97,6 +97,7 @@ Generate the hints for ELF format shared libraries.
Rescan the previously configured directories. This opens the previous hints
file and fetches the directory list from the header. Any additional pathnames
on the command line are also processed.
+This is the default action when no parameters are given.
.It Fl f Ar hints_file
Read and/or update the specified hints file, instead of the standard file.
This option is provided primarily for testing.
diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c
index 07e5abc..76f8299 100644
--- a/sbin/ldconfig/ldconfig.c
+++ b/sbin/ldconfig/ldconfig.c
@@ -115,7 +115,9 @@ char *argv[];
errx(1, "unknown object format \"%s\"", objformat);
hints_file = is_aout ? _PATH_LD_HINTS : _PATH_ELF_HINTS;
- while ((c = getopt(argc, argv, "Rf:mrsv")) != -1) {
+ if (argc == 1)
+ rescan = 1;
+ else while((c = getopt(argc, argv, "Rf:mrsv")) != -1) {
switch (c) {
case 'R':
rescan = 1;
OpenPOWER on IntegriCloud