From owner-svn-src-all@FreeBSD.ORG Tue Jan 17 15:17:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34BC8106564A; Tue, 17 Jan 2012 15:17:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0AB7C8FC0A; Tue, 17 Jan 2012 15:17:21 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id B6D1146B1A; Tue, 17 Jan 2012 10:17:20 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 22028B992; Tue, 17 Jan 2012 10:17:20 -0500 (EST) From: John Baldwin To: Colin Percival Date: Tue, 17 Jan 2012 10:08:28 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201201150709.q0F79Iif067938@svn.freebsd.org> <4F136109.9050004@FreeBSD.org> <4F13621B.1060203@freebsd.org> In-Reply-To: <4F13621B.1060203@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201201171008.28752.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 17 Jan 2012 10:17:20 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler Subject: Re: svn commit: r230125 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2012 15:17:21 -0000 On Sunday, January 15, 2012 6:32:43 pm Colin Percival wrote: > On 01/15/12 15:28, John Baldwin wrote: > > On 1/15/12 2:09 AM, Eitan Adler wrote: > >> Log: > >> - Fix undefined behavior when device_get_name is null > >> - Make error message more informative > > > > The in-kernel printf(9) always prints "(null)" for %s when the pointer is NULL, > > so that wasn't undefined behavior. Printing out the driver name is a useful > > change, but the "(unknown)" bits are just noise as it isn't clear that > > "(unknown)" is substantially better than "(null)". > > I think the change from "(null)" to "(unknown)" is useful, since when I see > "(null)" printed my immediate thought is "looks like there's a bug I need to > track down here". The entire printf is "there's a bug I need to track down here". (null) explicitly tells me that device_get_name() is NULL when looking at the printf to see what it means. Having it be (unknown) tells me the same exact thing, but only after I've parsed an extra 2-3 lines of code to figure out what (unknown) stands for. -- John Baldwin