From owner-freebsd-alpha Mon Mar 26 10:23:22 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id F2C9D37B719 for ; Mon, 26 Mar 2001 10:23:18 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id NAA20251; Mon, 26 Mar 2001 13:23:17 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.3/8.9.1) id f2QIMlL67664; Mon, 26 Mar 2001 13:22:47 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15039.35063.539812.824792@grasshopper.cs.duke.edu> Date: Mon, 26 Mar 2001 13:22:47 -0500 (EST) To: "Michael Richards" Cc: freebsd-alpha@FreeBSD.ORG Subject: Re: Coding Conventions In-Reply-To: <3ABF833F.00018D.48828@frodo.searchcanada.ca> References: <3ABF833F.00018D.48828@frodo.searchcanada.ca> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Michael Richards writes: > Just a quick question as I get down to a testable fix on the boot > loader problem: I've been hacking up the code adding things like: > #ifdef DEBUG > printf("returning from prom_open\n"); > #endif If I'm going to be using a lot of debugging printfs, then I tend to prefer something like this, rather than having an #ifdef/endif pair for every printf, but its a question of personal style.. #ifdef DEBUG #define DPRINTF(x) printf x #else #define DPRINTF(x) #endif <...> DPRINTF(("Debugging something\n")) > Should these be left in for future debugging or should the patch only > contain the real code changes? IE, if someone else needs to debug, > let them go in and add their own printf's... One unfortunate side I think it would be better to submit 2 patches -- 1 with just the fix, and one with the debugging statements. Don't let this opinion get in your way though, if you fix it, we'll take what we can get ;) > effect is that the boot loader will no longer fit on a single floppy > with the kernel. I deleted the kernel because it dies before getting > that far. Heh. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message