NetBSD/usr.bin
pk ce3fe4630a Fix the bug addressed in revision 1.27 properly. Analysis of the problem
(see also PR#15179):

  When looking up names which directory components (i.e. having slashes,
  except when of the form `./name'), FindFile()/DirLookup() first looks
  the final filename component in the cache for each directory on the search
  path and then proceeds to match the prefixed directory components by
  comparing them to the trailing directory components of the the search
  path being probed.

  This is not correct. When looking for `bar/target' in a path `.../src/foo',
  you want it to come up with `.../src/foo/bar/target' (if it exists). There's
  no point in comparing the the `bar' prefix on the target to the `foo' suffix
  on the search path. Indeed, this will cause a false match if those prefix
  and suffix components are actually equal and search path itself also has a
  file called `target'. For example, looking for `foo/target' in `.../src/foo'
  will spuriously match `.../src/foo/target', not `.../src/foo/foo/target'.

  This last bug prompted the change in dir.c, rev 1.27, which happens
  to partially workaround it by avoiding the above matching code in the
  case of the `curdir' search path entry (at the cost of incurring an
  exorbitant amount of cache misses). The situation is unchanged however,
  when processing other entries on the search path (e.g. those other than
  `dot' and `cur').

Drop the prefix matching code in DirLookup() entirely and use DirFindDot()
and DirLookup() only for names without proper directory components (i.e.
`target' and `./target). Otherwise, non-absolute names are dealt with by
DirLookupSubdir(), while absolute names can be checked for an exact match
of the directory components prefix against the directories on the current
search path. This allows for the use of the file cache to check the
existence of the file and additionally, provides a shortcut out of
Dir_FindFile() if we have the prefix match but not a cache entry (this
is especially beneficial for searches in .CURDIR when it's not equal
to `dot').
2002-01-31 12:38:34 +00:00
..
apply
apropos
asa
at
audio Actually be verbose if the -V flag is given. 2002-01-31 00:33:10 +00:00
awk Drop unnecessary .Pp. 2001-12-01 19:06:43 +00:00
banner Whitespace cleanup. 2001-12-01 16:43:07 +00:00
basename Sort sections. 2001-12-01 17:18:38 +00:00
bdes mdocify. Needs a second pass for SEE ALSO section. 2001-12-01 18:49:55 +00:00
biff Whitespace cleanup. 2001-12-01 16:43:07 +00:00
bzip2
bzip2recover MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
cal Whitespace cleanup. 2001-12-01 16:43:07 +00:00
calendar - knf 2001-12-04 15:55:32 +00:00
cap_mkdb
cdplay Need <sys/types.h> early on. 2002-01-23 01:09:15 +00:00
checknr Document basic mdoc(7) support, and some fixes. 2002-01-21 18:36:44 +00:00
chflags Whitespace cleanup. 2001-12-01 16:43:07 +00:00
chpass Sort sections, punctuation fixes, sort SEE ALSO. 2001-12-01 18:55:17 +00:00
cksum
cmp Whitespace cleanup. 2001-12-01 16:43:07 +00:00
col Whitespace cleanup. 2001-12-01 16:43:07 +00:00
colcrt Sort sections, sort SEE ALSO. 2001-12-01 18:57:03 +00:00
colrm Whitespace cleanup. 2001-12-01 16:43:07 +00:00
column Whitespace cleanup. 2001-12-01 16:43:07 +00:00
comm Whitespace cleanup. 2001-12-01 16:43:07 +00:00
compile_et Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly). 2001-12-12 12:24:19 +00:00
compress Whitespace cleanup. 2001-12-01 16:43:07 +00:00
crontab
crunch Add special command "keepsymbols", allows the specified external symbols 2002-01-25 12:05:00 +00:00
ctags Sort sections. 2001-12-01 19:03:08 +00:00
cut Whitespace cleanup. 2001-12-01 16:43:07 +00:00
dirname MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
du Use standard headers. 2001-12-01 19:03:31 +00:00
eject
elf2aout Sort sections, sort SEE ALSO, drop some .Pps. 2001-12-01 19:05:04 +00:00
elf2ecoff Sort sections, sort SEE ALSO, drop some .Pps and a '.' at the end of SEE ALSO. 2001-12-01 19:06:01 +00:00
env Punctuation nit. 2001-12-01 19:07:26 +00:00
error Use standard headers, drop a .Pp. 2001-12-01 19:08:56 +00:00
expand
false
fdformat Sort sections. 2001-12-01 19:09:41 +00:00
fgen Labels must be followed by statements. 2001-12-31 18:31:59 +00:00
file Slight cleanup to ELF core file handing, and add support for 2001-12-09 23:21:07 +00:00
find Since we've already been down that road with -cnewer, support GNU find(1)'s 2001-12-02 12:46:39 +00:00
finger
fmt Sort SEE ALSO. 2001-12-01 19:11:58 +00:00
fold Whitespace cleanup. 2001-12-01 16:43:07 +00:00
fpr
from Whitespace cleanup. 2001-12-01 16:43:07 +00:00
fsplit Whitespace cleanup. 2001-12-01 16:43:07 +00:00
fstat Punctuation nit, sort sections. 2001-12-01 19:13:18 +00:00
ftp update copyrights 2001-12-26 09:40:15 +00:00
gencat Make almost all tools compile and run properly on non-NetBSD hosts. (In 2002-01-29 10:20:28 +00:00
getconf Add {POSIX_MONOTONIC_CLOCK} variables. 2002-01-31 00:32:47 +00:00
getopt Sort sections, use standard headers. 2001-12-01 19:20:32 +00:00
gprof
head Whitespace cleanup. 2001-12-01 16:43:07 +00:00
hesinfo Whitespace cleanup. 2001-12-01 16:43:07 +00:00
hexdump WARNS=2 2001-12-07 15:14:29 +00:00
id
indent .Pp not necessary before or after .Ss/.Sh. 2001-12-01 19:27:33 +00:00
innetgr Whitespace cleanup. 2001-12-01 16:43:07 +00:00
ipcrm
ipcs Sort sections, use standard markup for AUTHORS section, use standard headers. 2001-12-01 19:29:08 +00:00
join Sort sections. 2001-12-01 19:29:58 +00:00
jot
kdestroy Remove -I${DESTDIR}/usr/include/openssl from CPPFLAGS; it's unnecessary, 2001-12-31 19:24:12 +00:00
kdump reflect iric o32/n32 emulations 2002-01-07 23:45:10 +00:00
kf Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly). 2001-12-12 12:24:19 +00:00
kinit Remove -I${DESTDIR}/usr/include and -I${DESTDIR}/usr/include/openssl from 2001-12-31 19:25:36 +00:00
klist Remove -I${DESTDIR}/usr/include and -I${DESTDIR}/usr/include/openssl 2001-12-31 19:26:59 +00:00
kpasswd Remove -I${DESTDIR}/usr/include and -I${DESTDIR}/usr/include/openssl 2001-12-31 19:26:59 +00:00
ktrace
ktruss Force makeerrnos.sh to be run with sh instead of depending on it being 2001-12-02 08:41:14 +00:00
lam mdocify 2001-12-01 20:31:37 +00:00
last
lastcomm
ldd Update ELFSIZE and VARPSZ arch lists. 2002-01-23 01:38:57 +00:00
leave Drop unnecessary .Pp, no trailing dots in SEE ALSO, please, and sort sections. 2002-01-21 11:42:55 +00:00
less * Avoid stale pointers into a previously used termcap buffer. 2002-01-14 10:36:25 +00:00
lex Remove extraneous linkage to -ll. 2002-01-30 21:07:35 +00:00
locate MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
lock Whitespace cleanup. 2001-12-01 16:43:07 +00:00
logger Whitespace cleanup. 2001-12-01 16:43:07 +00:00
login Happy New Year! 2002-01-01 09:27:53 +00:00
logname Whitespace cleanup. 2001-12-01 16:43:07 +00:00
look Whitespace cleanup. 2001-12-01 16:43:07 +00:00
lorder
m4 Make compilable from src/tools/m4 on non-NetBSD hosts. 2002-01-21 21:49:57 +00:00
machine
mail PR/15000: Mike Heffner: mail(1) doesn't reposition pointer correctly 2001-12-19 00:06:11 +00:00
make Fix the bug addressed in revision 1.27 properly. Analysis of the problem 2002-01-31 12:38:34 +00:00
man Sort sections. 2001-12-01 20:35:54 +00:00
menuc Make almost all tools compile and run properly on non-NetBSD hosts. (In 2002-01-29 10:20:28 +00:00
mesg
midiplay Sort sections. Use .Ev for environment variables. 2002-01-05 20:55:16 +00:00
mixerctl Use _PATH_SOUND etc, all fall back to _PATH_SOUND0 (etc.) if that fails. 2002-01-31 00:03:23 +00:00
mk_cmds Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly). 2001-12-12 12:24:19 +00:00
mkdep Add hooks for cross-hosting on non-NetBSD platforms. 2002-01-21 19:22:53 +00:00
mkfifo Whitespace cleanup. 2001-12-01 16:43:07 +00:00
mklocale Make almost all tools compile and run properly on non-NetBSD hosts. (In 2002-01-29 10:20:28 +00:00
mkstr Sort SEE ALSO. 2001-11-21 16:26:18 +00:00
mktemp
modstat Sort sections, sort SEE ALSO, use standard headers, mdocify AUTHORS section. 2001-12-01 20:43:06 +00:00
msgc Make almost all tools compile and run properly on non-NetBSD hosts. (In 2002-01-29 10:20:28 +00:00
msgs Punctuation nit, sort SEE ALSO. 2001-12-01 20:44:29 +00:00
netgroup Whitespace cleanup. 2001-12-01 16:43:07 +00:00
netstat Whitespace cleanup. 2001-12-01 16:43:07 +00:00
newsyslog Sort sections, use Nx. 2001-12-08 19:09:16 +00:00
nfsstat
nice Punctuation nit. 2001-12-08 19:09:35 +00:00
nl Whitespace cleanup. 2001-12-01 16:43:07 +00:00
nohup Sort sections. 2001-12-08 19:09:57 +00:00
openssl Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly). 2001-12-12 12:24:19 +00:00
pagesize
passwd Whitespace cleanup. 2001-12-01 16:43:07 +00:00
paste Whitespace cleanup. 2001-12-01 16:43:07 +00:00
patch Whitespace cleanup. 2001-12-01 16:43:07 +00:00
pmc Due to a typo, the kernel and user counters were getting swapped. Make 2002-01-03 05:04:52 +00:00
pr Punctuation nits, drop superfluous .Pps. 2001-12-08 19:10:20 +00:00
printenv
printf Punctuation nits. 2001-12-08 19:10:43 +00:00
qsubst
quota Sort sections. 2001-12-08 19:10:54 +00:00
radioctl Make flag parsing work. Print more capabilities. 2002-01-03 18:23:09 +00:00
rdist Sort SEE ALSO, sort sections, punctuation nit. 2001-12-08 19:11:21 +00:00
renice Sort sections. 2001-12-08 19:11:33 +00:00
rev
rlogin Sort SEE ALSO. 2001-12-08 19:11:44 +00:00
rpcgen Make almost all tools compile and run properly on non-NetBSD hosts. (In 2002-01-29 10:20:28 +00:00
rpcinfo Minor nroff formatting fixes per PR 13800 2002-01-13 07:15:50 +00:00
rs Indent, uncompactify and sort options. 2001-12-18 00:50:59 +00:00
rsh
rup Use standard headers, punctuation nit. 2001-12-08 19:13:08 +00:00
ruptime
rusers Separate xrefs by a comma. 2001-12-08 19:13:31 +00:00
rwall Punctuation nit. 2001-12-08 19:13:43 +00:00
rwho
script Whitespace cleanup. 2001-12-01 16:43:07 +00:00
sed Add a -E flag to ed(1) and sed(1) so that they can use extended 2002-01-23 19:07:33 +00:00
shar Sort sections. 2001-12-08 19:14:31 +00:00
shlock Use .Pp instead of empty lines, mark up AUHTORS section. 2001-12-08 19:14:58 +00:00
showmount Sort sections. 2001-12-08 19:15:12 +00:00
shuffle
skey Use standard headers, sort SEE ALSO. 2001-12-08 19:15:32 +00:00
skeyinfo
skeyinit
soelim Sort sections. 2001-12-08 19:15:45 +00:00
sort Change some: 2001-12-31 18:45:04 +00:00
split Sort sections. 2001-12-08 19:16:19 +00:00
ssh Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly). 2001-12-12 12:24:19 +00:00
string2key Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly). 2001-12-12 12:24:19 +00:00
su Sort sections, sort SEE ALSO, use .Pp instead of empty lines. 2001-12-08 19:17:03 +00:00
systat Make it compile (more vmstat fallout). 2002-01-28 13:20:43 +00:00
tail Sort sections. 2001-12-08 19:17:23 +00:00
talk Drop a .Pp, sort sections. 2001-12-08 19:17:46 +00:00
tcopy
tee
telnet Make telnet escape work in tn3270 2002-01-06 01:02:47 +00:00
tftp Whitespace cleanup. 2001-12-01 16:43:07 +00:00
time Sort sections. 2001-12-08 19:18:26 +00:00
tip Sort SEE ALSO. 2001-12-08 19:18:39 +00:00
tn3270 Make telnet escape work in tn3270 2002-01-06 01:02:47 +00:00
top Make this directory usable on a case insensitive fs. 2002-01-21 20:07:34 +00:00
touch
tput Sort sections. 2001-12-08 19:19:05 +00:00
tr Punctuation nit. 2001-12-08 19:19:20 +00:00
true
tset
tsort Add hooks for cross-hosting on non-NetBSD platforms. 2002-01-21 19:22:53 +00:00
tty Whitespace cleanup. 2001-12-01 16:43:07 +00:00
ul Sort sections. 2001-12-08 19:19:41 +00:00
uname Whitespace cleanup. 2001-12-01 16:43:07 +00:00
unexpand MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
unifdef Sort sections. 2001-12-08 19:19:41 +00:00
uniq
units mdoc'ify. Sort sections. 2001-12-18 01:06:09 +00:00
unvis
usbhidaction Re-read the configuration file on HUP. 2002-01-18 14:38:59 +00:00
usbhidctl Print items with a usage range in a comprehensible way. 2001-12-29 21:23:24 +00:00
users
uudecode MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
uuencode Sort sections, sort SEE ALSO. 2001-12-08 19:21:02 +00:00
vacation Use Bd -literal instead of Bd -unfilled. 2001-12-08 19:21:33 +00:00
vgrind MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
vi Fixed FreeBSD PR #12801, the way nvi 1.81.5 did it. 2002-01-13 11:59:23 +00:00
vis
vmstat Use the new disk and tty stats sysctls when operating on a live kernel, 2002-01-28 02:15:15 +00:00
w Sort SEE ALSO and sections. 2001-12-08 19:24:10 +00:00
wall
wc
what Sort sections. 2001-12-08 19:24:57 +00:00
whatis
whereis Whitespace cleanup. 2001-12-01 16:43:07 +00:00
which Match braces. Patch from misc/14925 by Hiramatsu Yoshifumi. 2001-12-12 16:03:15 +00:00
who Whitespace cleanup. 2001-12-01 16:43:07 +00:00
whois Drop some .Pp, sort sections. 2002-01-13 11:16:52 +00:00
window Sort sections. 2001-12-08 19:26:45 +00:00
write
xargs Remove mention of -I in SYNOPSIS until we've actually implemented it. 2002-01-28 13:49:49 +00:00
xinstall Identify where errors come from, rather than just doing err[x]("%s", foo). 2002-01-28 19:44:03 +00:00
xlint Define FLOAT_SIZE, DOUBLE_SIZE, LDOUBLE_SIZE, and ENUM_SIZE in 2002-01-30 06:54:56 +00:00
xstr Teach xstr(1) about gcc's __asm and __asm__ directives. 2002-01-12 02:13:12 +00:00
yacc Only invoke __RCSID/__COPYRIGHT if these macros exist. 2002-01-30 20:38:49 +00:00
yes
ypcat Punctuation nit, sort SEE ALSO, mark up AUTHORS section. 2001-12-08 19:28:41 +00:00
ypmatch Punctuation nit, sort SEE ALSO, mark up AUTHORS section. 2001-12-08 19:28:41 +00:00
ypwhich Mark up AUTHORS section. 2001-12-08 19:29:20 +00:00
Makefile Add a program for controlling radio(4) devices. Written by Maxim Tsyplakov 2002-01-01 21:56:28 +00:00
Makefile.inc