Init.c, making it chroot
M. Warner Losh
imp at bsdimp.com
Sat Jan 6 18:34:17 UTC 2007
this patch looks good, however, one nit:
In message: <200701052106.l05L60a6042599 at lurza.secnetix.de>
Oliver Fromme <olli at lurza.secnetix.de> writes:
: + if (stat("/dev", &stst) != 0)
: + warning("Can't stat /dev: %m");
: + else {
: + if (stst.st_dev == root_devno)
: + devfs++;
: + }
is more succinctly expressed as:
+ if (stat("/dev", &stst) != 0)
+ warning("Can't stat /dev: %m");
+ else if (stst.st_dev == root_devno)
+ devfs++;
Also, kenv(KENV_GET, ... is used a lot. Maybe it makes sense to have
a simple kenvget call. Would make a few lines a little shorter if
nothing else.
Otherwise, I think this is a great patch. I don't see other problems
with it.
Warner
More information about the freebsd-hackers
mailing list