From owner-svn-src-all@FreeBSD.ORG Tue Jan 17 19:44:31 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 D99A6106564A; Tue, 17 Jan 2012 19:44:31 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id A4D5B8FC15; Tue, 17 Jan 2012 19:44:31 +0000 (UTC) Received: from [127.0.0.1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.5/8.14.5) with ESMTP id q0HJMR1g084867; Tue, 17 Jan 2012 12:22:27 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <201201171008.28752.jhb@freebsd.org> Date: Tue, 17 Jan 2012 12:22:26 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201201150709.q0F79Iif067938@svn.freebsd.org> <4F136109.9050004@FreeBSD.org> <4F13621B.1060203@freebsd.org> <201201171008.28752.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1251.1) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Eitan Adler , Colin Percival 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 19:44:31 -0000 On Jan 17, 2012, at 8:08 AM, John Baldwin wrote: > 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 >>>=20 >>> 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)". >>=20 >> 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". >=20 > 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. >=20 I like that change. "null" is ambiguous for those who aren't intimately = familiar with the bus code. Scott