Date: Sat, 06 Jan 2007 11:33:48 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: olli@lurza.secnetix.de Cc: erik.udo@gmail.com, freebsd-hackers@freebsd.org, dougb@freebsd.org Subject: Re: Init.c, making it chroot Message-ID: <20070106.113348.353676879.imp@bsdimp.com> In-Reply-To: <200701052106.l05L60a6042599@lurza.secnetix.de> References: <200701041459.18321.jhb@freebsd.org> <200701052106.l05L60a6042599@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
this patch looks good, however, one nit: In message: <200701052106.l05L60a6042599@lurza.secnetix.de> Oliver Fromme <olli@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070106.113348.353676879.imp>