#define DBG(m, x) __UL_DBG(whereis, WHEREIS_DEBUG_, m, x)
#define ON_DBG(m, x) __UL_DBG_CALL(whereis, WHEREIS_DEBUG_, m, x)
+#define UL_DEBUG_CURRENT_MASK UL_DEBUG_MASK(whereis)
+#include "debugobj.h"
+
static char uflag = 0;
/* supported types */
static const char *bindirs[] = {
"/usr/bin",
"/usr/sbin",
+#if defined(MULTIARCHTRIPLET)
+ "/lib/" MULTIARCHTRIPLET,
+ "/usr/lib/" MULTIARCHTRIPLET,
+ "/usr/local/lib/" MULTIARCHTRIPLET,
+#endif
"/usr/lib",
"/usr/lib64",
"/bin",
static void whereis_init_debug(void)
{
- __UL_INIT_DEBUG(whereis, WHEREIS_DEBUG_, 0, WHEREIS_DEBUG);
+ __UL_INIT_DEBUG_FROM_ENV(whereis, WHEREIS_DEBUG_, 0, WHEREIS_DEBUG);
}
static const char *whereis_type_to_name(int type)
fputs(_(" -l output effective lookup paths\n"), out);
fputs(USAGE_SEPARATOR, out);
- fputs(USAGE_HELP, out);
- fputs(USAGE_VERSION, out);
- fprintf(out, USAGE_MAN_TAIL("whereis(1)"));
+ printf(USAGE_HELP_OPTIONS(16));
+ printf(USAGE_MAN_TAIL("whereis(1)"));
exit(EXIT_SUCCESS);
}
DBG(SEARCH, ul_debug("lookup dirs for '%s' (%s), want: %s %s %s",
patbuf, pattern,
want & BIN_DIR ? "bin" : "",
- want & MAN_DIR ? "min" : "",
+ want & MAN_DIR ? "man" : "",
want & SRC_DIR ? "src" : ""));
p = strrchr(patbuf, '.');
if (p)