Patch submitted for bug 263278.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Now that lead me down the rabbit hole.
boot2 doesn't do this in boot2.c. It calls lookup() which is in ufsread.c in libsa. And that has this loop to parse the path (path is a cursor variable that walks through the path, s is the end of this segment of the path):
for (;;) {
if (*path == '/')
path++;
...
for (s = path; *s && *s != '/'; s++);
...
ls = *path == '?' && n == 1 && !*s;
...
if ((dt = fsfind(name, &ino)) <= 0)
break;
path = s;
}n == 1 means that ? is the only character (ignoring degenerate cases) after the / and is the last character of the string. So ? or /bin/? or /usr/local/lib/? will trigger ls == true. fsfind checks the global variable 'ls' and will just print all the files in that directory and return 0 so this loop terminates.
So I think the document as written is correct.
After @imp did some rabbit holing, abandon this review and close the bug attached as "works as intended". Thanks for taking a look, Warner!