I *think* that nvlist_add_string() and friends don't cope with a NULL value, which means that all of the places where optional strings turn up in an API need to cope with absence. I've commented on a few such places, but there's probably more...
|198 ↗||(On Diff #10503)|
Should this be prefixed with a if (nvlist_exists_string(nvl, "ai_canonname")), plus an initialization of canonname to NULL above?
|228–229 ↗||(On Diff #10503)|
Either one of hostname/servname can be NULL, which I don't think nvlist_add_string() copes with.
|299 ↗||(On Diff #10503)|
add && nvlist_exists_string(nvl, "host") ?
|301 ↗||(On Diff #10503)|
add && nvlist_exists_string(nvl, "serv") ?
|517 ↗||(On Diff #10503)|
Need to initialize both of these to NULL I think
|577 ↗||(On Diff #10503)|
check that host/serv are != NULL ?
|597 ↗||(On Diff #10503)|
Check for ai->ai_canonname == NULL?
|616 ↗||(On Diff #10503)|
Can hostname/servname be absent?
|49 ↗||(On Diff #10503)|
Presumably these tests haven't been updated yet?
Please also update these as needed:
targets/pseudo/userland/lib/Makefile.depend: lib/libcasper \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/dns \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/grp \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/pwd \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/random \
targets/pseudo/userland/libexec/Makefile.depend: libexec/casper/sysctl \
|551 ↗||(On Diff #11216)|
This change should not be needed. The change in etc/mtree/BSD.root.dist will create the directory.