]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
whereis: lookup also info docs
authorKarel Zak <kzak@redhat.com>
Mon, 2 Feb 2015 10:15:47 +0000 (11:15 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Feb 2015 10:15:47 +0000 (11:15 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/whereis.1
misc-utils/whereis.c

index 652f69bc756bdfc84dfb17cf55095ed693f78893..5e63e9b48ffc103b0343ab3d415020a76d19b5aa 100644 (file)
@@ -100,7 +100,8 @@ searches for binaries, by a whitespace-separated list of directories.
 .IP "\fB\-M \fIlist\fP"
 Limit the places where
 .B whereis
-searches for manuals, by a whitespace-separated list of directories.
+searches for manuals and documentation in Info format, by a
+whitespace-separated list of directories.
 .IP "\fB\-S \fIlist\fP"
 Limit the places where
 .B whereis
index e6f5b41668f10ddb217482e558b7c01a39a73fec..9fc5ee7ee8a6f12dc6cc6e71686ed8f766cd693b 100644 (file)
@@ -154,6 +154,7 @@ static const char *mandirs[] = {
        "/usr/X11/man/*",
        "/usr/TeX/man/*",
        "/usr/interviews/man/mann",
+       "/usr/share/info",
        NULL
 };
 
@@ -193,8 +194,8 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
        fputs(USAGE_OPTIONS, out);
        fputs(_(" -b         search only for binaries\n"), out);
        fputs(_(" -B <dirs>  define binaries lookup path\n"), out);
-       fputs(_(" -m         search only for manuals\n"), out);
-       fputs(_(" -M <dirs>  define man lookup path\n"), out);
+       fputs(_(" -m         search only for manuals and infos\n"), out);
+       fputs(_(" -M <dirs>  define man and info lookup path\n"), out);
        fputs(_(" -s         search only for sources\n"), out);
        fputs(_(" -S <dirs>  define sources lookup path\n"), out);
        fputs(_(" -f         terminate <dirs> argument list\n"), out);
@@ -372,7 +373,7 @@ static int filename_equal(const char *cp, const char *dp)
 {
        int i = strlen(dp);
 
-       /*DBG(printf("compare '%s' and '%s'", cp, dp));*/
+       DBG(SEARCH, ul_debug("compare '%s' and '%s'", cp, dp));
 
        if (dp[0] == 's' && dp[1] == '.' && filename_equal(cp, dp + 2))
                return 1;