]> git.ipfire.org Git - thirdparty/util-linux.git/commit
whereis: reset search mask more carefully
authorKarel Zak <kzak@redhat.com>
Thu, 23 Oct 2014 12:29:45 +0000 (14:29 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Oct 2014 12:29:45 +0000 (14:29 +0200)
commitf4802c901134c56718e0c47308536c7eb2d552ae
treed0be6912218daf934a2644a24050d9c97c168d0a
parent3635f53ca2587bea133d3f56022ef42c88797f97
whereis: reset search mask more carefully

 # whereis -m cal -M /usr/share/man/man1/ -f ls
 cal: /usr/share/man/man1/cal.1.gz /usr/share/man/man1p/cal.1p.gz
 ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz

the -M also resets the search mask, so for 'ls' it returns also
binaries. That's bug. Expected result is:

 # ./whereis -m cal -M /usr/share/man/man1/ -f ls
 cal: /usr/share/man/man1/cal.1.gz /usr/share/man/man1p/cal.1p.gz
 ls: /usr/share/man/man1/ls.1.gz

the search mask has to be sensitive only to -b -m -s options,
otherwise the semantic is pretty messy.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/whereis.1
misc-utils/whereis.c