]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
whereis: search in /(s)bin before /usr/lib
authorKarel Zak <kzak@redhat.com>
Thu, 17 Jan 2019 10:19:27 +0000 (11:19 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 17 Jan 2019 10:19:27 +0000 (11:19 +0100)
Addresses: https://github.com/karelzak/util-linux/issues/741
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/whereis.c

index 828106ffe79ed9b8f9a42d9a221084ce002d1d7f..c598d494e834683578100ccebb6fe1f7bdabad2b 100644 (file)
@@ -99,6 +99,8 @@ struct wh_dirlist {
 static const char *bindirs[] = {
        "/usr/bin",
        "/usr/sbin",
+       "/bin",
+       "/sbin",
 #if defined(MULTIARCHTRIPLET)
        "/lib/" MULTIARCHTRIPLET,
        "/usr/lib/" MULTIARCHTRIPLET,
@@ -106,8 +108,6 @@ static const char *bindirs[] = {
 #endif
        "/usr/lib",
        "/usr/lib64",
-       "/bin",
-       "/sbin",
        "/etc",
        "/usr/etc",
        "/lib",