From owner-cvs-all@FreeBSD.ORG Thu Aug 26 19:11:25 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A465716A4CF; Thu, 26 Aug 2004 19:11:25 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id F117B43D41; Thu, 26 Aug 2004 19:11:24 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i7QJBFEV064741; Thu, 26 Aug 2004 21:11:16 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Brian Fundakowski Feldman From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 26 Aug 2004 14:30:22 EDT." <20040826183022.GO77326@green.homeunix.org> Date: Thu, 26 Aug 2004 21:11:15 +0200 Message-ID: <64740.1093547475@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Pawel Jakub Dawidek cc: cvs-all@FreeBSD.org cc: Roman Kurakin Subject: Re: cvs commit: src/sys/geom/concat g_concat.c src/sys/geom/label g_label.c src/sys/geom/mirror g_mirror.c src/sys/geom/raid3 g_raid3.c src/sys/geom/stripe g_stripe.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 19:11:25 -0000 In message <20040826183022.GO77326@green.homeunix.org>, Brian Fundakowski Feldm an writes: >> KASSERT(error == 0 && pp->sectorsize > 0 && pp->mediasize > 0, ("Buggy code.")); > >I don't like that one bit. Get used to it :-) >KASSERT() should be reserved for serious >programming errors -- guarding against side cases that show major >error. That KASSERT does guide against a major error on the part of the programmer. In GEOM I have generously sprinkled KASSERTs for the very purpose of stopping programmer misunderstandings or attempts to be smart. The intent is that the programmer will find his bugs even during light testing and that the KASSERTs will help clarify the intentional use of APIs. They have been very successful in this respect, and more will be added as I think them up. Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.