Having only a single moving pointer is less confusing than the previous
copying between tgt and cp. For example, it did not make sense that the
target would start with '!'.
No functional change.
In PrintLocation, fname is not an iterator, so prefer fname[0] over
*fname.
List stdout and stderr in this order, for consistency with main.c.
No functional change.
Calling malloc(0) may return a null pointer, but callers of bmake_malloc
do not expect that.
Reported by Chris Pinnock, found by cross-compiling NetBSD on OpenBSD,
where tools/groff creates Makefile.dep files of size 0.
getopts has different behaviour if the leading character
of optstring is `:', so describe in more detail:
- no errors are printed (already there)
- unknown options set var to `?' and OPTARG to the unknown option
- missing arguments set var to `:' and OPTARG to the option name
Slight rewording of other paragraphs for more clarity.
Fix the x11 check if /usr/X11R6/lib/X11/* needs to migrate to /etc/X11/*
by ensuring that the former actually is detected.
Avoids false migration errors for paths such as /fs if /usr/X11R6
doesn't exist, such as:
x11 check:
Migrate /fs to /etc/X11/fs
The original implemention handled this correctly, but the bug
crept in postinstall 1.110 on 2010/11/21.
Note: There are some calls to SIOCADDMULTI/SIOCDELMULTI that take the
lock when they don't need it, but it's not clear it's harmful either
unless they come via a caller that holds softnet_lock.
candidate fix for
https://mail-index.netbsd.org/current-users/2021/12/31/msg041876.html
ok yamaguchi
IEEE 802.3 clause 22's PHY device has a link status bit in the BMCR
register, but it's required to read twice to get the correct value.
Almost all PHY devices have the vendor specific register which has
the link status bit that it's not required to read twice. makphy(4)
use the bit in the PSSR register to reduce the access cost.
QEMU's e1000 provides the PHY specific status register at 0x11 but the
link indication bit (PSSR_LINK.) is always 1 because
e1000x_update_regs_on_link_{down,up}() modify MII_SR_LINK_STATUS
(BMSR_LINK in NetBSD) but don't modify PSSR_LINK. It causes
"virsh domif-setlink xxx yyy down" doesn't work.
To avoid this problem, read the BMSR and check the BMSR_LINK bit. Add
MAKPHY_QUIRK_PSSR_LINK bit for this quirk. Set it if MII_EXTSR doesn't
exist because it's one of the case of QEMU.
Found and tested by ozaki-r.
that is to be referenced after a return from setjmp() via longjmp().
This doesn't ever seem to have caused a problem, but I think using
volative vars is required here.
For reasons I never bothered to discover, even though this change
certainly requires a store into stack memory which wasn't required
before, earlier measurements showed the shell getting (slightly) smaller
with this change in place.
NFCI
that "continue" is a command as intended, and not an invalid last arg to
the '[' command (the last arg is required to be ']').
Sometime the proverbial someone should go through this and remove all the
obsolete test -o and -a operators, and probably do something with test's
usage of ! as well. Not today, or not by me anyway.