]> git.ipfire.org Git - thirdparty/util-linux.git/commit
whereis: cleanup debug stuff, fix argv[] usage
authorKarel Zak <kzak@redhat.com>
Thu, 23 Oct 2014 11:44:00 +0000 (13:44 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Oct 2014 11:44:00 +0000 (13:44 +0200)
commit3635f53ca2587bea133d3f56022ef42c88797f97
treeb38c023c69b016e98ad40f9a8839d84d4769470b
parentfd211531e8b079380c3b041a4768005b63c42d78
whereis: cleanup debug stuff, fix argv[] usage

* use debug stuff from include/debug.h and make whereis(1) sensitive
  to WHEREIS_DEBUG=0xffff mask

* fix problem with argv[] usage

  # whereis -b -m -M /usr/share/man/man1 -B /usr/bin -f gcc
  bin: /usr/local/bin
  gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz

the code ignores "-B" and /usr/bin is interpreted as search pattern,
expected result is:

  # whereis -b -m -M /usr/share/man/man1 -B /usr/bin -f gcc
  gcc: /usr/share/man/man1/gcc.1.gz /usr/bin/gcc

Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765306
Signed-off-by: Karel Zak <kzak@redhat.com>
include/debug.h
misc-utils/whereis.c