Page MenuHomeFreeBSD

Casper new architecture.

Authored by oshogbo on Nov 25 2015, 9:20 PM.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

oshogbo retitled this revision from to Casper new architecture..
oshogbo updated this object.
oshogbo edited the test plan for this revision. (Show Details)
oshogbo added a reviewer: jonathan.
oshogbo added a project: capsicum.

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?

Update according to David suggestion.
I forgot to commit changes about test, thanks!
You make very good points.

oshogbo added inline comments.
198 ↗(On Diff #10503)

dnvlist will be bather here but you are right we should check this value.

517 ↗(On Diff #10503)

It's done.
Just before memset.

oshogbo added a reviewer: ed.
oshogbo added subscribers: rwatson, pjd.
bdrewery requested changes to this revision.Jan 8 2016, 6:55 PM
bdrewery added a reviewer: bdrewery.

Please also update these as needed:

targets/pseudo/userland/Makefile.depend:DIRDEPS+= sbin/casperd
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.

This revision now requires changes to proceed.Jan 8 2016, 6:55 PM
oshogbo edited edge metadata.

I updated Makefile.depnd which was pointed out byt @bdrewery.
I update also some dependencies in libnames and BSD.debug.dist.

This revision was automatically updated to reflect the committed changes.